Banky has asked for the wisdom of the Perl Monks concerning the following question:
The surprising thing that happened when 'category' and 'subcategory' weren't defined was that the "allon" option got passed in the first slot.sub makeMenuInput{ my ($category,$subcategory,$allIsOn)=@_; } makeMenuInput($query->param('category'),$query->param('subcategory')," +allon");
What I ended up having to do to get around this was:
Can anyone explain why this occurs?makeMenuInput($query->param('category')||"",$query->param('subcategory +')||"","allon");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unexpected behavior after passing $query-param('bar') as subroutine parameter
by merlyn (Sage) on Sep 18, 2001 at 22:53 UTC | |
|
Re: Unexpected behavior after passing $query-param('bar') as subroutine parameter
by blakem (Monsignor) on Sep 18, 2001 at 22:58 UTC |