Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Dereferencing a hash reference to a Hash of Arrays

by Chmrr (Vicar)
on Jun 19, 2002 at 10:08 UTC ( #175610=note: print w/ replies, xml ) Need Help??


in reply to Dereferencing a hash reference to a Hash of Arrays

You want to use @{...} to dereference the array reference. That is, @{$sort->{23}} will get you a list. For your specific problem, I'd do:

my $search = 'price'; my $column = 23; if (grep {$_ eq $search} @{$sort->{$column}}) { # ... }

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'


Comment on Re: Dereferencing a hash reference to a Hash of Arrays
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2014-08-21 04:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (127 votes), past polls