in reply to Reading text file with <CR> line endings
This untested fragment should work:
#!/usr/bin/env perl use warnings; use strict; use open IO => ':bytes'; use autodie; open my $fh, '<', 'foo.txt'; $/ = "\x0D"; while (<$fh>) { chomp; ...; } close $fh; __END__
I don't remember this IO layer stuff very well. Best regards, Karl
«The Crux of the Biscuit is the Apostrophe»
perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help
|
|---|