CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Regular Expressions: Re: [NuclearClam] Simple regex problem: Edit Log


Aug 7, 2002, 12:41 AM

Views: 22537
Re: [NuclearClam] Simple regex problem

1. Parameterless shift uses the default array @_
my $input = shift; is the equivalent of my $input = shift(@_);

2. Function call parameters automatically go into the default array @_
Thus, stripExtension("somename.dat") puts 'somename.dat' as the first element of the @_ array inside the function. Shifting the @_ puts the 'somename.dat' into the $input variable.

Hope that's detailed enough...

Jean Spector
SQA Engineer @ Exanet

There are only 10 types of people in the world -
Those who understand binary, and those who don't.

(This post was edited by Jean on Aug 7, 2002, 12:45 AM)

Edit Log:
Post edited by Jean (User) on Aug 7, 2002, 12:44 AM
Post edited by Jean (User) on Aug 7, 2002, 12:45 AM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives