Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: iterating hash keys?

by kcott (Canon)
on Sep 26, 2013 at 18:59 UTC ( #1055882=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
        s/$re/$id_for{$1}/g;
        print $out_replaced_fh $_;
    }
    
  2. or download this
    $ cat pm_1055846_name_id_data.txt
    bananas 456
    oranges 23
    peaches 897236
    kiwis 3726
    
  3. or download this
    $ cat pm_1055846_name_replace_data.txt
    bananas,oranges
    ...
    oranges
    kiwis,oranges,bananas,bananas
    bananas,oranges,pineapples,peaches,kiwis
    
  4. or download this
    $ cat pm_1055846_name_replaced_out.txt
    456,23
    ...
    23
    3726,23,456,456
    456,23,pineapples,897236,3726
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2016-10-01 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (9 votes). Check out past polls.