junk.pl:
#! perl -slw use strict; use Junk; our $ERROR_FILE = 'fred'; Junk::showIt();
Junk.pm:
package main; our $ERROR_FILE; package Junk; use strict; use warnings; sub showIt { print $ERROR_FILE; } 1;
C:\test>junk.pl fred
In reply to Re^7: globally seen variable
by BrowserUk
in thread globally seen vairable
by vit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |