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; }
In reply to Re^4: simple Perl script template
by pme
in thread simple Perl script template
by Dumu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |