in reply to Re^3: simple Perl script template
in thread simple Perl script template
In case of using 'warn' 'next' should be added to suppress unnecessary error messages (I suppose strictures are on) eg.:
In case of error we have to rerun the script after fixing the reason. In this sense there is no difference between 'die' and 'warn' version. But 'die' version is smaller -> "small is beautiful"unless (open my $fh, '>', $fname) { warn "Cannot open $fname - $!\n"; next; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: simple Perl script template
by marinersk (Priest) on Apr 09, 2015 at 16:11 UTC |