Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Re (tilly) 1: grep instead of foreach? - hash slices

by bjelli (Pilgrim)
on May 22, 2001 at 14:41 UTC ( #82202=note: print w/ replies, xml ) Need Help??


in reply to Re: Re (tilly) 1: grep instead of foreach?
in thread grep instead of foreach?

is using a hash-slice there. The idea is: to address more then one entry in the hash at once. a simple example:

my %languages; $languages{'python'} = 'boring'; @languages{'perl', 'perl6'} = ('cool', 'real soon now'); # this is short for ( $languages{'perl'} , $languages{'perl6'} ) = ('cool', 'real soon now'); # or $languages{'perl'} = 'cool'; $languages{'perl6'} = 'real soon now';

There are also array-slices.

Read perlman:perldata

--
Brigitte    'I never met a chocolate I didnt like'    Jellinek
http://www.horus.com/~bjelli/         http://perlwelt.horus.at


Comment on Re: Re: Re (tilly) 1: grep instead of foreach? - hash slices
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://82202]
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: (12)
As of 2014-07-25 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (172 votes), past polls