Kaushal Shriyan wrote:
Hi,

I am referring to http://www.gnulamp.com/perlscalars.html

$a = $b; # Assign $b to $a

Note that when Perl assigns a value with *$a = $b* it makes a copy of $b and
then assigns that to $a. Therefore the next time you change $b it will not
alter $a.

I did not understand the Note:- Can some one make me understand this
statement with examples

All they're saying is that $a = $b doesn't tie $a and $b together in any way,
it just copies the value of $b to $a. If you change $b after that it won't
alter $a again.

and also what i understand from the below statements( I have added in the
comments), is it correct.

$a += $b;   #is it $a = $a + $b;
$a -= $b;    #is it $a = $a - $b;
$a .= $b;    #is it $a = $a . $b;

Exactly right. Well done.

Rob

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to