Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: RFC: Self Assessment Perl -- special variables

by SuicideJunkie (Vicar)
on Sep 05, 2018 at 21:22 UTC ( [id://1221805]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: Self Assessment Perl -- special variables
in thread RFC: Self Assessment Perl

$h = {%h} personally I never seen used this way and I'd stress the standard form to take reference as in \%h
They do different things; as the {%h} will get you a reference to a shallow copy of the hash, not just a reference to the original.
>perl -e "my %h = (1,2); my $g = {%h}; $g->{1}=3; print $h{1} . ' vs ' + . $g->{1};" 2 vs 3
I see you've spotted that in the update tho.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-19 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found