Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
or this:@a = ( [1,2,{foo=>"foo",bar=>"bar"}], [3,4,{baz=>"baz",far=>"baz"}] );
? I've seen the former more often, but I'm not sure why... to me, the latter makes it more natural to pull out elements since it's references all the why down to the scalars ($r->[0]->2->{foo}). Any input welcome.$r = [ [1,2,{foo=>"foo",bar=>"bar"}], [3,4,{baz=>"baz",far=>"baz"}] ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: when to use lists/hash vs references?
by almut (Canon) on Jul 15, 2010 at 21:01 UTC | |
|
Re: when to use lists/hash vs references?
by BrowserUk (Patriarch) on Jul 15, 2010 at 21:19 UTC | |
by chromatic (Archbishop) on Jul 16, 2010 at 00:30 UTC | |
by BrowserUk (Patriarch) on Jul 16, 2010 at 00:49 UTC | |
by chromatic (Archbishop) on Jul 16, 2010 at 01:20 UTC | |
by BrowserUk (Patriarch) on Jul 16, 2010 at 01:49 UTC | |
| |
|
Re: when to use lists/hash vs references?
by FunkyMonk (Bishop) on Jul 15, 2010 at 21:16 UTC | |
|
Re: when to use lists/hash vs references?
by TomDLux (Vicar) on Jul 16, 2010 at 01:29 UTC | |
|
Re: when to use lists/hash vs references?
by aquarium (Curate) on Jul 16, 2010 at 03:56 UTC |