in reply to local @ARGV and die()

Well, you could set a SIG handler, or you might just shift @ARGV yourself and use 'open(...) or die...':
{ local @ARGV = 'not_a_file'; local $SIG{__WARN__} = sub { die shift }; # SIG{__WARN__} is now set INSIDE the while loop # also, so you might want to unset it locally there while (<>) { print "This won't print\n"; } print "This won't print either\n"; }

Replies are listed 'Best First'.
Re: Re: local @ARGV and die()
by dserodio (Novice) on Sep 14, 2001 at 23:33 UTC
    Oh, that's pretty neat! Thanks. use Fatal looks good too, but I'm using 5.005_03 (Debian Potato).