Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2017-11-20 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (284 votes). Check out past polls.

    Notices?