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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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



Jean
User


Aug 7, 2002, 12:41 AM


Views: 8102
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
jean.spector@softhome.net


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