in reply to Dreaded Symbolic References
this is wrong: you can't assign a list (as given by qw/.../) to an array element. what you're writing is:@RecordNames[94] = qw/$Destination $DestinationType/; @RecordLengths[94] = qw/$A8 A4/;
and this will not work, of course. furthermore, you should abandon the habit of populating a single variable for each field you have (eg. $Destination, $DestinationType). use a hash instead:$RecordNames[94] = "$Destination"; $RecordLengths[94] = "$A8";
hope this helps...$fields[94] = [ qw/Destination DestinationType/ ]; $lengths[94] = qq/A8 A4 / ; my @data{ @{$fields[94]} } = unpack($lengths[94], $Record); # then you have: # # $data{Destination} # $data{DestinationType}
King of Laziness, Wizard of Impatience, Lord of Hubris
|
---|