Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Unpack Bin file problemby bart (Canon) |
on Mar 01, 2013 at 21:38 UTC ( [id://1021348]=note: print w/replies, xml ) | Need Help?? |
Your problem is in
and you haven't touched $/, so this will just read one line, until the first "\n". Do just before you read the file, for example in a bare block, and oh, don't forget to binmode the filehandle if this has to work on something other than Linux, and it'll work fine. It sets this special variable to undef, in case you were wondering, so now you'll read the whole file.
In Section
Seekers of Perl Wisdom
|
|