Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Fetch array of values from hashref

by k-mx (Acolyte)
on Sep 11, 2019 at 07:30 UTC ( #11106002=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $h = { foo => 1, bar => 2 };
    @{ $h }{qw/ foo bar /} = ( 667, 889 );
    # or postfix form:
    # $h->@{qw/ foo bar /} = ( 667, 889 );
    
  2. or download this
    my @ar = values %$h;
    # or postfix form:
    # my @ar = values $h->%*;
    
  3. or download this
    perldoc perldata
    perldoc perlref
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2019-11-19 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (93 votes). Check out past polls.

    Notices?