"Scott R. Godin" wrote:
>
> 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);
>
> :-)
Wipe that smile off your face! :-) I forgot that die was available in
Perl4, however statement modifiers weren't so that won't work.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]