Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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

by SuicideJunkie (Vicar)
on Sep 05, 2018 at 21:22 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2021-10-24 19:27 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (89 votes). Check out past polls.