in reply to Aes or blowfish file encryption/decryption ?
use autodie; # to get better and automatic error messages open my $IN, "<:raw", 'filename.zip'; binmode $IN; my $contents = do { local $/; <$IN> }; close $IN; # and then work with $contents
See also: perlopentut, open, PerlIO.
Update: After actually reading PerlIO it seems that :raw and binmode do the same thing, though it can't hurt to test them both together.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Aes or blowfish file encryption/decryption ?
by ikegami (Patriarch) on Dec 02, 2010 at 20:18 UTC |