in reply to Re^2: On Foreach Loops and Maintainability
in thread On Foreach Loops and Maintainability
Is there a reason that the idea merlyn mentioned (that I think is a excellent use of perl) was comprehensively glossed over?
I'd also try and do away with the if block but I think cond or next; reads a little unintuatively and would probably use
next unless cond;
for ( 'arg1' .. 'arg5', "arg19", 'gee13' .. 'gee37' ) { next unless $object->method( $_ ); # do stuff }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: On Foreach Loops and Maintainability
by Aristotle (Chancellor) on Oct 11, 2002 at 21:25 UTC |