Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Keep It Simple, Stupid
 
PerlMonks  

Localizing hash keys in an AoH

by kennethk (Monsignor)
on Mar 15, 2013 at 18:54 UTC ( #1023759=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    use warnings;
    ...
    }
    
    print Dumper \@data;
    
  2. or download this
    # Doesn't work
    LOCAL_BLOCK_2: {
        local $data[$_]{unit} = 'S' for 0 .. $#data;
    ...
    #    
    #    print Dumper \@data;
    #}
    
  3. or download this
    LOCAL_BLOCK: {
        my @units = map $_->{unit}, @data;
        $_->{unit} = 'S' for @data;
    ...
    
        $data[$_]{unit} = $units[$_] for 0 .. $#data;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-04-18 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (466 votes), past polls