|
$a='10.1.2.' $b='3' ping $a+$b #fails with string 10.1.2.+3 $addr=$a+$b ping $addr #works Why is the first ping string including the plus sign in the concatenation when '+' is an operator ? The presence of "ping" turns off '+' behaving as an operator because $a+$b on a line by itself returns the correct address. Is there a way to force '+' to be an operator on the ping line?
(comments are locked)
|