You could use unless and exit. And if you want to see why it fails you can add $!
unless(open(LOG, "< $file")){ print "Sorry could not open $file - $!","\n"; exit; }
In reply to Re: or DIE adding line number to error
by baztastic
in thread or DIE adding line number to error
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |