in reply to Perl style... help me figure this out.
May I ask why you're trying to steer clear from arrays (I'm assuming you mean loops instead of arrays) and grep?
Also, I'm pretty sure the code you provided does not run. Your $hash hashref has keys that point to arrayrefs, so you would need to dereference them like so:
print $hash->{COOKIES}->[0]; # Gives you: CHOCOLATE CHIP
EDIT: I stand corrected. $hash->{COOKIES}[0] works just fine. Seems weird to me, but there you go.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl style... help me figure this out.
by Jenda (Abbot) on Feb 07, 2012 at 14:29 UTC | |
by Riales (Hermit) on Feb 07, 2012 at 15:43 UTC |