in reply to Re: problem unless I use ".="
in thread problem unless I use ".="
But you're correct; you don't get a warning. And that's because you're not trying to use the value of $baseball{yankees}, you're only modifying it (ie. appending to it).
Note that you do get a warning if $baseball{mets} is undefined, as in:
use strict; use warnings; my %baseball = ( orioles => "baltimore", twins => "minnesota" ); if ($baseball{yankees} .= $baseball{mets}) { foreach $_ (keys %baseball) { print "$_ => $baseball{$_}\n"; } } __END__ Use of uninitialized value in concatenation (.) or string at test.pl l +ine 10.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: problem unless I use ".="
by cgmd (Beadle) on May 13, 2007 at 15:55 UTC | |
by liverpole (Monsignor) on May 13, 2007 at 16:32 UTC | |
by demerphq (Chancellor) on May 14, 2007 at 08:50 UTC |