in reply to Producing 2 lists from a grep call
Giving you:for $item @list { next if definite failure condition action if most likely condition action if next most likely condition etc. default action }
I imagine this will look a lot more elegant with the new perl 6 switch statement.for (readdir DIR) { next if $_ eq '.' || $_ eq '..'; push (@files,$_) && next if -f $base/$_; push (@dirs,$_) && next if -d $base/$_; # default to no operation }
--
Steve Marvell
|
|---|