Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Dereference array-elements

by crazyinsomniac (Prior)
on Jun 03, 2002 at 12:09 UTC ( #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
Node Status?
node history
Node Type: note [id://171207]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2019-07-18 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?