in reply to Re^4: I'm having a strange bug with basic file input. I'm a total newb.
in thread I'm having a strange bug with basic file input. I'm a total newb.
my ( $name, @tests ) = unpack( 'A20 A3 A3 A3 A3', $line );
With 5.8.0+, you can even do
my ( $name, @tests ) = unpack( 'A20 (A3)4', $line );
or
my ( $name, @tests ) = unpack( 'A20 (A3)*', $line );
Update: Heh, I hadn't noticed the bit about unpack at the bottom before posting.
|
|---|