Loading ...
Sorry, an error occurred while loading the content.

Scoping issues

Expand Messages
  • Electron One
    How can you create a variable to be visible across multiple files? For example, File 1 contains a variable called $Joe, and in file 1 I call file 2 by saying,
    Message 1 of 2 , Oct 3, 2003
    • 0 Attachment
      How can you create a variable to be visible across multiple files?

      For example, File 1 contains a variable called $Joe, and in file 1 I call
      file 2 by saying, do 'file2.pl' and I want file 2 to also see $Joe as a
      variable.

      Any help would be appreciated.
    • merlyn@stonehenge.com
      ... Electron How can you create a variable to be visible across multiple files? Electron For example, File 1 contains a variable called $Joe, and in file 1 I
      Message 2 of 2 , Oct 3, 2003
      • 0 Attachment
        >>>>> "Electron" == Electron One <electron1@...> writes:

        Electron> How can you create a variable to be visible across multiple files?
        Electron> For example, File 1 contains a variable called $Joe, and in file 1 I call
        Electron> file 2 by saying, do 'file2.pl' and I want file 2 to also see $Joe as a
        Electron> variable.

        Electron> Any help would be appreciated.

        Learn about packages and modules.

        "perldoc perlmod" is a good start.

        --
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
        <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
        Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
        See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
      Your message has been successfully submitted and would be delivered to recipients shortly.