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

Re: Using Global Variables in Perl

by mscharrer (Hermit)
on Apr 22, 2008 at 17:18 UTC ( [id://682227]=note: print w/replies, xml ) Need Help??


in reply to Using Global Variables in Perl

I would change the following:
  • use var qw(...) to the newer our $var, $var2,..;
  • Add a package moduleA; in your module file.
  • Either write $moduleA::readMode or use the Exporter package to export your mode variables to the main file
BTW: Are you sure that pop(@_) is what I want, e.g. the last element of the list? Normally you do shift @_. In both cases the @_ is not needed because it's taken automatically inside a sub.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (9)
As of 2024-03-28 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found