On 10/10/07, Kaushal Shriyan <[EMAIL PROTECTED]> wrote: > > Can you please explain me with a sample code. If I understand it correctly > does the below code holds true for your explanation >
Lets put it this way. I the world of C/C++, there's something called a pointer. The syntax of Perl and C/C++ is not the same, but I'll make an effort.... You can have code like this: *c = 5; // The thing that $c points to now is 5 a = c; // Now a and c are the same, ie refer to the same item. printing "$a = $c" would print "5 = 5" *c = 6; // The thing that $c points to now is 6. $a points to the same thing as $c does, so now print "$a" would print 6. Even though $a wasn't changed!! Anyhow, the point is that Perl doesn't have those confusing weird "pointer" stuff. $a and $c do not "point" to the same place, the just got the same value. (Well, Perl /does/ have pointers, but... whatever.) Anyhow, I hope this clears up the confusion. If it just confused you more, forget about it :D