Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: help with references

by tobyink (Abbot)
on May 04, 2013 at 19:22 UTC ( #1032075=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for my $i ( 1 .. 2 ) {
            my @new = @a;     # copy of @a
            $h{"$i"} = \@new; # reference the copy
    }
    
  2. or download this
    for my $i ( 1 .. 2 ) {
            $h{"$i"} = [@a];
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (15)
As of 2014-10-30 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls