in reply to Hash Splice
If you really want to "slice" (not really "splice") your hash then you can:
my %hash = ( 'foo' => [1,2,3], 'bar' =>[3,4,5]); my @wantedKeys = qw(foo); my %wanted; @wanted{@wantedKeys} = @hash{@wantedKeys};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash Splice
by Anonymous Monk on Sep 21, 2007 at 09:23 UTC | |
by Corion (Patriarch) on Sep 21, 2007 at 09:27 UTC | |
by perlofwisdom (Pilgrim) on Sep 21, 2007 at 12:49 UTC |