From: "Scott R. Godin" <[EMAIL PROTECTED]> > John W. Krahn wrote: > > unless ( opendir( DIR, $_start ) ) { > > print STDERR "Cannot open $_start: $!"; > > exit 1; > > } > > die "Cannot open directory $_start: $!" > unless opendir(DIR, $_start);
Just FYI these two are not equivalent: eval { die "Died\n"; }; print "NOT DEAD :-P\n"; eval { print STDERR "Exited\n"; exit(1); }; print "ENDE\n"; The die() throws an exception that if uncaught can exit the script. exit() simply exits the script. In this case you probably want die(), not print STDERR+exit(). Though this would be Perl5. I have no idea what would or would not work in Perl4 mentioned earlier in this thread. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]