<?xml version="1.0" encoding="windows-1252"?>
<node id="1019959" title="Difference between my $self = shift and my ($self) = @_" created="2013-02-21 10:13:52" updated="2013-02-21 10:13:52">
<type id="115">
perlquestion</type>
<author id="1001991">
Doctrin</author>
<data>
<field name="doctext">
Hello dear Monks!

I just wanted to know - is there any REAL difference between following. Say, I do:
&lt;code&gt;
$bag-&gt;contents();
&lt;/code&gt;

And my subroutine is:

&lt;code&gt;
sub contents {
my $self = shift; # WHAT IF I CALL my ($self) = @_ ?
#so something
return;
}
&lt;/code&gt;

So, is there any real difference between &lt;code&gt;my $self = shift&lt;/code&gt; and &lt;code&gt;my ($self) = @_&lt;/code&gt;

Thanks!</field>
</data>
</node>
