Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Tanktalus's scratchpad

by Tanktalus (Canon)
on Jan 21, 2005 at 15:30 UTC ( #424004=scratchpad: print w/replies, xml ) Need Help??

use Data::Dumper; use Data::Diver qw(DiveRef DiveVal); my $foo = "a:b:c:d:a"; my $bar = "a:b:c:d:z"; my $hoh = {}; sub add_item { my $href = shift; my $str = shift; my @keys= split /:/, $str; my $last= pop @keys; push @{ DiveVal( $href, \( @keys ) ) }, [ $last, $str ]; return; } add_item($hoh, $foo); add_item($hoh, $bar); print Dumper($hoh);
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
holli tries to remember where he put that Stinger-II leftover from Afghanistan
shmem writes BEGIN{$^H=(3<<9)+( 1<<1)} instead of use strict; for being silly

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-09-22 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (268 votes). Check out past polls.

    Notices?