Le 15/05/2017 à 16:30, sisyph...@optusnet.com.au a écrit :
Unfortunately, I don't know how to get that binmode() into the
one-liner's angle brackets :-(
you might consider playing with the PERLIO environment variable :
$ perl -E "print qq{hello\nworld\n}" > secure.txt
$ od -c secure.txt
0000000 h e l l o \r \n w o r l d \r \n
0000016
$ perl -MDigest::SHA1=sha1_hex -le "print sha1_hex <>" secure.txt
58853e8a5e8272b1012f9a52a80758b27bd0d3cb
$ PERLIO=unix perl -MDigest::SHA1=sha1_hex -le "print sha1_hex <>"
secure.txt
19576d392b021ac25efdca6f1886b5ce5b1090c4
$
--Christian