in reply to or DIE adding line number to error
open(LOG, "< $file") or die "Sorry could not open $file\n";
I was thinking doing an if/else and exit
I'd say stick with die. exit cannot be trapped later on (in case you decide the error can be handled somehow), and if you do not trap the die it will exit anyway.
|
|---|