in reply to Unpack Bin file problem
Your problem is in
and you haven't touched $/, so this will just read one line, until the first "\n".my @lines = unpack ("W*", <INFILE>);
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.local $/;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Unpack Bin file problem
by mark4444az (Sexton) on Mar 01, 2013 at 22:36 UTC | |
by bart (Canon) on Mar 01, 2013 at 23:37 UTC | |
by mark4444az (Sexton) on Mar 04, 2013 at 15:58 UTC |
In Section
Seekers of Perl Wisdom