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: Beginner: Can someone explain what local (*err) = shift means?: Edit Log



perlFun
Novice

Jun 14, 2013, 2:26 PM


Views: 497
Can someone explain what local (*err) = shift means?

There is a line when I first enter a subroutine that reads:

local (*err) = shift;

I know that local refers to the scope of this variable (like a "my" or an "our", but for "local" it designates that it will only be within this subroutine), and shift takes the very first variable out of the @_ array (which contains the args passed in to the sub). I am unclear what the (*err) is. I am assuming err is the name being assigned to the variable but what about the use of parens around it as well as the *? I am unsure and wasn't able to find the answer and was wondering if anyone might be able to tell me.


Thank you so much!


(This post was edited by perlFun on Jun 14, 2013, 2:27 PM)


Edit Log:
Post edited by perlFun (Novice) on Jun 14, 2013, 2:27 PM


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

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