Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Dreaded Symbolic References

by dada (Chaplain)
on Mar 08, 2004 at 17:24 UTC ( #334879=note: print w/replies, xml ) Need Help??


in reply to Dreaded Symbolic References

@RecordNames[94] = qw/$Destination $DestinationType/; @RecordLengths[94] = qw/$A8 A4/;
this is wrong: you can't assign a list (as given by qw/.../) to an array element. what you're writing is:
$RecordNames[94] = "$Destination"; $RecordLengths[94] = "$A8";
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:
$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}
hope this helps...

cheers,
Aldo

King of Laziness, Wizard of Impatience, Lord of Hubris

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://334879]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2022-01-24 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (64 votes). Check out past polls.

    Notices?