in reply to Re: Hash of Regex
in thread Hash of Regex
$VAR1 = { 'int' => 'float', 'brown' => 'yellow' };
(note to the OP) In case you wonder why this is:
my %dict = ( 'brown' => 'yellow', /int(\d+)/ => 'int', /float(\d+)/ => 'float', );
is the same as
my %dict = ( 'brown' => 'yellow', $_ =~ /int(\d+)/ => 'int', $_ =~ /float(\d+)/ => 'float', );
which (in this case) is the same as
my %dict = ( 'brown' => 'yellow', () => 'int', () => 'float', );
which is the same as
my %dict = ( 'brown' => 'yellow', 'int' => 'float', );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Hash of Regex
by Anonymous Monk on Apr 06, 2010 at 22:49 UTC | |
by LanX (Saint) on Apr 06, 2010 at 22:56 UTC | |
by almut (Canon) on Apr 06, 2010 at 22:56 UTC |
In Section
Seekers of Perl Wisdom