in reply to How to validate %hash = ( 'a' => 'b', ...);
... I expected omitting the redundant quotes to produce "bareword" errors under strict
use strict; use warnings; use Data::Dump qw/pp dd/; my %hash = ( accents => 'utf-8', accounting => 'money', bank => 'money'. bank2 => 'money'. bank3 => 'money', perls => 'perl' ); dd \%hash;
but funnily the auto-quoting effect of the fat comma => has higher precedence than the concat operator. (?)
{ accents => "utf-8", accounting => "money", bank => "moneybank2", moneybank3 => "money", perls => "perl", }
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to validate %hash = ( 'a' => 'b', ...);
by Anonymous Monk on Sep 12, 2016 at 07:29 UTC | |
by LanX (Saint) on Sep 12, 2016 at 10:08 UTC |