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


Jun 14, 2013, 2:26 PM

Views: 1294
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 (User) 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