On 06/13/13 01:41, Shlomi Fish wrote:
1. You're lacking strict and warnings: 2. You're looping using $_ : 3. You're using md5_hex by slurping the contents of the file into memory, 4. read_file was not explictly imported from File::Slurp: Both the Perl Cookbook and Programming Perl are showing their age.
I have different quality metrics/ expectations for one-liners turned into scripts than I do for large-scale multi-person systems software products:
$ perl -MFile::Slurp -e 'use Digest::MD5 qw(md5_hex); print("$_: ", md5_hex(read_file $_), "\n") for @ARGV' cgi*
cgi_cookie.pl: 073a858f3e7c7d8461743f758bc99a76 cgi_header.pl: 99b11f007ed9efceb3b500b8a30e0558 cgi_param.pl: 25b88f62883301d08554cd5707e00d10 cgi_redirect.pl: 69622c750a131d00b1c30c553fc7d916 David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/