in reply to Doing stuff in specific directories on Unix
Any advise on improving this because it does work but want to make sure I am doing it the most efficient way.
Worry less about efficiency and more about maintainability. There's no reason to put all of that right in the call to find(), is there? Why not make it more readable and easier to extend later by separating the part where you construct the directory names like this
use strict; use File::Find; my $base = '/perl/bin'; my @dirs = map "$base/$_", qw( FirstOne SecondTwo ThirdThree); find( \&Searcher, @dirs ); # ...
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Doing stuff in specific directories on Unix
by chromatic (Archbishop) on Jul 28, 2003 at 20:22 UTC | |
by sauoq (Abbot) on Jul 28, 2003 at 20:26 UTC | |
by Anonymous Monk on Jul 29, 2003 at 11:57 UTC |