John W. Krahn wrote:

>> ($_pattern, $_start) = (shift, shift);
>> print "Starting search at: $_start\n";
>> 
>> chdir "$_start";
> 
> Useless use of quotes.  You should verify that chdir worked.
> 
> unless ( chdir $_start ) {
>     print STDERR "Cannot chdir to $_start: $!";
>     exit 1;
>     }
> 
> 
>> opendir (DIR, "$_start");
> 
> Useless use of quotes.  You should verify that opendir worked.
> 
> unless ( opendir( DIR, $_start ) ) {
>     print STDERR "Cannot open $_start: $!";
>     exit 1;
>     }
> 
> 

die "Cannot chdir to $_start: $!"
        unless chdir($_start);

die "Cannot open directory $_start: $!"
        unless opendir(DIR, $_start);

:-)


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to