note
ikegami
<p>So you want me to explains how it's impossible to write the method without the <c>print</c> operator? Well, why don't you try it.
<p>Or are you asking me to explain why they don't do the same thing? Well, consider
<c>
>perl -le"$x = 'abc'; print $x;"
abc
</c>
<p>As you can see, it doesn't call the method <c>$x</c> of class <c>abc</c>. If it was an indirect method call, it would have the following outcome:
<c>
>perl -le"$x = 'abc'; $x->print;"
Can't locate object method "print" via package "abc" (perhaps you forgot to load "abc"?) at -e line 1.
</c>
1022654
1023848