in reply to Dereference array-elements
Please read perlref, perldata, perllol, perldsc.
#!/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 Section
Seekers of Perl Wisdom