Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Dereference array-elements

by crazyinsomniac (Prior)
on Jun 03, 2002 at 12:09 UTC ( [id://171207]=note: print w/replies, xml ) Need Help??


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;"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://171207]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-19 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found