Results 1 to 3 of 3
What is the meaning of $line.='0' in perl ??...
- 02-13-2008 #1Linux Newbie
- Join Date
- Jan 2008
- Posts
- 114
What is the meaning of $line.='0' in perl ??
What is the meaning of $line.='0' in perl ??
- 02-13-2008 #2
If it's the same as PHP it means add 0 to the end of $line. For instance:
$line="1"
$line.=0
echo $line
Will print "10"Linux User #453176
- 02-13-2008 #3
Indeed. More specifically, '.' is the string concatenation operator. So just like
translates to:Code:$n += 3
We see thatCode:$n = $n + 3
translates toCode:$n .= '0'
Code:$n = $n . '0'
DISTRO=Arch
Registered Linux User #388732


Reply With Quote