#!/usr/bin/perl -wl use strict; my @hashes = ( { a => 1}, { b => 2}, { c => 3}); my %hash = %{ ( grep { haass($_) } @hashes )[0] }; print for keys %hash; sub haass { my $r = shift; exists $r->{c} ? $r : (); } __END__
| ______crazyinsomniac_____________________________ Of all the things I've lost, I miss my mind the most. perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;" |
In reply to Re: Dereference array-elements
by crazyinsomniac
in thread Dereference array-elements
by very empty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |