in reply to Using pack/unpack on a PNG file
my $ifh = open("<:raw", "./file-bar.png");
Wishful, also quite surprising that Perl seems happy with it even with warnings and strictures enabled. In any event, the "successful" result (1) of open-ing the file is assigned to $ifh and this is packed and written (apparently also "successfully") to another file. But it's still junk.
Can anyone explain to me how this works — with strictures enabled?c:\@Work\Perl\monks\sierpinski>perl -wMstrict -MData::Dump -le "my $ifh = open('<:raw', 'junk.txt'); dd $ifh; " 1
Give a man a fish: <%-(-(-(-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using pack/unpack on a PNG file
by choroba (Cardinal) on May 26, 2015 at 07:08 UTC | |
by AnomalousMonk (Archbishop) on May 26, 2015 at 07:24 UTC | |
by choroba (Cardinal) on May 26, 2015 at 07:30 UTC | |
by AnomalousMonk (Archbishop) on May 26, 2015 at 07:35 UTC | |
by Anonymous Monk on May 26, 2015 at 09:48 UTC |