[Chicago-talk] Limiting a hash, or producing an interesting list
Steven Lembark
lembark at wrkhors.com
Tue Nov 25 23:28:10 CST 2003
-- Jay Strauss <me at heyjay.com>
> That's not really what I want though.
>
> your way, I end up with a hash with everything, and an array that tells me
> the offsets in my original array.
>
> But I want a hash with only the stuff I think is interesting
ok, assign the slice to a hash instead of an array:
my %foo = ();
@foo{@knead} = @input{@offsetz};
Learn to think in terms of lists rather than "variables",
it's one of the more powerful attributes of Perl -- and
perhaps the only reason LISP has survived this long.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 888 359 3508
More information about the Chicago-talk
mailing list