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

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?

What's my password?
Create A New User
[Discipulus]: if i had to go to psycho i need to ask why i always end with over complex datastructure: now i have an HoHoAoH in my object
[Discipulus]: i will need to handle by reference later on
[Eily]: kinda sounds like father Christmas is late
[hippo]: (asking because I'm sure you said before about learning English) Did you know there are 2 different words for smaller quantities in English? They are "less" and "fewer". Fewer applies to a number of discrete things like days.
Eily notes also
[hippo]: So if you don't drink as much milk and not as often you are said to drink less milk on fewer days. Confusing, eh?
[Eily]: same as many/much, few/little

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2018-01-23 09:10 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (242 votes). Check out past polls.