Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Keep It Simple, Stupid
 
PerlMonks  

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

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.