in reply to Smart-search/When question
Because qw// constructs a list not an array.
When you did this:
given ($ext) { when (qw/jpeg jpg png/) {
You should have seen the warning:
Useless use of a constant in void context at
You could do it in-line as:
given ($ext) { when ( @{[ qw/jpeg jpg png/] ]} ) {
But it's a bit cheesy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Smart-search/When question
by John M. Dlugosz (Monsignor) on Mar 18, 2011 at 07:46 UTC | |
by BrowserUk (Patriarch) on Mar 18, 2011 at 08:44 UTC |