John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
Originally I wrote the qw directly in the when statement. It doesn't work. Breaking it out like this makes it work as intended. What is the difference? --Johnmy @gr_choices= qw/jpeg jpg png/; # ??? why does this have to be on +a separate line? given ($ext) { when (@gr_choices) { ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Smart-search/When question
by toolic (Bishop) on Mar 18, 2011 at 01:39 UTC | |
by educated_foo (Vicar) on Mar 18, 2011 at 02:36 UTC | |
|
Re: Smart-search/When question
by BrowserUk (Patriarch) on Mar 18, 2011 at 01:40 UTC | |
by John M. Dlugosz (Monsignor) on Mar 18, 2011 at 07:46 UTC | |
by BrowserUk (Patriarch) on Mar 18, 2011 at 08:44 UTC | |
|
Re: Smart-search/When question
by wind (Priest) on Mar 18, 2011 at 02:23 UTC | |
|
Re: Smart-search/When question
by Khen1950fx (Canon) on Mar 18, 2011 at 10:17 UTC |