in reply to Re^2: Secret Perl Operators: the boolean list squash operator, x!!
in thread Secret Perl Operators: the boolean list squash operator, x!!
He probably means something like this:
exists $hash{ foo } && exists $hash{ foo }{ bar } ? $hash{ foo }{ bar +} : ()
In this case, switching to x!! will cause $hash{ foo }{ bar } to always be evaluated, which will cause $hash{ foo } to be autovivified even if the condition is false.
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Secret Perl Operators: the boolean list squash operator, x!!
by Jenda (Abbot) on Jul 31, 2006 at 17:44 UTC | |
Re^4: Secret Perl Operators: the boolean list squash operator, x!!
by eric256 (Parson) on Jul 31, 2006 at 17:47 UTC |
In Section
Meditations