Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How do I create a new array in memory?

by btrott (Parson)
on Jun 27, 2000 at 02:03 UTC ( [id://19929]=note: print w/replies, xml ) Need Help??


in reply to How do I create a new array in memory?

You need to declare the variable lexically with my:
while (<>) { my @record = split /,/; my $key = shift @record; $list{$key} = \@record; }
You can test this by printing out the array references; they should all have different addresses:
print join "\n", values(%list), '';

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found