Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Weird Perl Rule I'm Probably Not Following

by nedals (Deacon)
on Oct 14, 2005 at 23:16 UTC ( [id://500399]=note: print w/replies, xml ) Need Help??


in reply to Re: Weird Perl Rule I'm Probably Not Following
in thread Weird Perl Rule I'm Probably Not Following

my $value1 = shift; # shift along acts on @_ so its the same as @_[0];

Not really.
shift will remove the first element from @_
@_[0] leaves it in place

  • Comment on Re^2: Weird Perl Rule I'm Probably Not Following

Replies are listed 'Best First'.
Re^3: Weird Perl Rule I'm Probably Not Following
by eric256 (Parson) on Oct 15, 2005 at 04:44 UTC

    Sorry you took that a little literaly. I meant that it filled the same position as @_[0] did in his code. Which IS true. I probably should have made that clearer.


    ___________
    Eric Hodges

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://500399]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-23 16:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found