in reply to Re: A conversation with a C programmer
in thread A conversation with a C programmer
can be condensed tonext if($file eq "."); next if($file eq "..");
Isn't that more Perlish, and help the programmer see more of the usefulness of regexes without making him too lost in what is going on? But now that I think about it, the whole snippet can just be compressed to something likenext if $file =~ /^\.{1,2}$/;
right? Do you think that would rock the boat too much?opendir(TARGET, $target); while($file = readdir(TARGET)) { &process_new_file($file) if $file =~ /\.xls$/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: A conversation with a C programmer
by Anonymous Monk on Mar 15, 2006 at 20:38 UTC | |
|
Re^3: A conversation with a C programmer
by dynamo (Chaplain) on Mar 16, 2006 at 00:13 UTC | |
by fizbin (Chaplain) on Mar 25, 2006 at 06:28 UTC | |
by Anonymous Monk on Mar 16, 2006 at 02:03 UTC |