Subject: | Filter::decrypt vs crlf |
Date: | Mon, 25 Jan 2010 11:32:39 +1100 |
To: | bug-Filter [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
I wondered what if anything a filter operating on binary input might
have to do to ensure there's no crlf translation on msdos. I gave
Filter::decrypt a try on the foo.pl below with a faked-up PERLIO=crlf,
perl encrypt foo.pl
PERLIO=crlf perl foo.pl
=>
Can't find string terminator '"' anywhere before EOF at foo.pl line 2.
The standalone decrypt doesn't get back to the original either,
PERLIO=crlf perl decr foo.pl
The "aZ" in foo.pl is cooked up to come out as CR LF in the encrypted
file :-).
Dunno if PERLIO=crlf forces more crlfs than actually happens on msdos,
and I suppose Filter::decrypt is mainly an example, but it'd be good to
show where a binmode() or whatever should be inserted for a binary type
filter to see correct bytes.
print "aZ\n";