[EMAIL PROTECTED] wrote:

I found this in a template for creating subroutines, this is the base that is created when you use the template to create the subroutine.

So now the newbie part, why would you place "my  $par1 = shift;" in the
subroutine template, and what does it do??

Basically I am trying to find out if I need to modify the template or
not. Any help would be greatly appreciated.

Oh and btw I looked at the shift function and it applies to the @_
array, which is not being used in this subroutine, and neither is @par1
, so my only guess would be that the template is creating a verifiably
empty variable called $par1 .

sub Irfan
{
  my  $par1 = shift;

        return ;
        } # ----------  end of subroutine Irfan  ----------

Inside of a subroutine "shift" with no arguments is the same as "shift @_" and outside of a subroutine "shift" with no arguments is the same as "shift @ARGV". You can read all about subroutines in the perlsub document.


perldoc perlsub



John
--
use Perl;
program
fulfillment

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




Reply via email to