Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Bizarre copy of HASH in leave

by Anonymous Monk
on Sep 17, 2012 at 07:23 UTC ( #993982=note: print w/ replies, xml ) Need Help??


in reply to Bizarre copy of HASH in leave

that code is broken , it uses symbolic references

you probably meant

#!/usr/bin/perl -- use strict; use warnings; my $rtag = 'WHAT'; my $pp = { FEATURES => { WHAT => {} } }; my $pdi = { 1,1,2,2,3,3 }; @{ $pp->{'FEATURES'}{$rtag} } { keys(%$pdi) } = values(%$pdi); use Data::Dump; dd $pp; dd $pdi; __END__ { FEATURES => { WHAT => { 1 => 1, 2 => 2, 3 => 3 } } } { 1 => 1, 2 => 2, 3 => 3 }

and 5.8.8 is very old


Comment on Re: Bizarre copy of HASH in leave
Download Code
Re^2: Bizarre copy of HASH in leave
by vijesh (Novice) on Sep 18, 2012 at 04:35 UTC

    Thank you very much. This works.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2015-07-06 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (84 votes), past polls