Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Hash of Regex

by Anonymous Monk
on Apr 06, 2010 at 22:49 UTC ( #833145=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Hash of Regex
in thread Hash of Regex

Why / how did this

my %dict = ( 'brown' => 'yellow', () => 'int', () => 'float', );
become this??
my %dict = ( 'brown' => 'yellow', 'int' => 'float', );


Comment on Re^3: Hash of Regex
Select or Download Code
Re^4: Hash of Regex
by LanX (Canon) on Apr 06, 2010 at 22:56 UTC
    For Perl => is just a comma, and empty lists () are ignored when flattening lists.

    perl -e' @a=(1,2,(),(),3);print "@a"' 1 2 3

    Cheers Rolf

Re^4: Hash of Regex
by almut (Canon) on Apr 06, 2010 at 22:56 UTC

    Empty elements (lists) in a list collapse,  e.g. (1, (), 2, 3, (), (), 4) is the same as (1, 2, 3, 4).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-07-30 19:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (240 votes), past polls