in reply to Re: need help to fix "use of uninitialized value..."
in thread need help to fix "use of uninitialized value..."
You cannot use an undefined value in a string concatenation. So, $PairsOf{$Person1} //= ""; will define $PairsOf{$Person1} to be a null string if it isn't already defined. If the value is already defined, then this should have no effect. A null string can be used in a concatenation.
$Pairs{$Person1} //= $Person1; $Pairs{$Person2} //= $Person2; $PairsOf{$Person1} //= ""; $PairsOf{$Person2} //= ""; $PairsOf{$Person1} = $PairsOf{$Person1} . " " . $Person2; $PairsOf{$Person2} = $PairsOf{$Person2} . " " . $Person1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: need help to fix "use of uninitialized value..."
by mlebel (Hermit) on Feb 18, 2012 at 02:15 UTC |