Sorry, must have got garbled in the transfer to the website. See the whole thing below. Note that if this was the case, the script would not have run the second time after changing strict and execution would be aborted at compilation because Perl wouldn't find ExportScalar.
type ExportScalar.pm package ExportScalar; use strict; use warnings; use Exporter; our @ISA = qw( Exporter ); our @EXPORT_OK = qw( DEBUG ); our $DEBUG = 1; sub DEBUG { if (@_) { $DEBUG = shift; } return $DEBUG; } 1;
In reply to Re^8: Global variables in Perl
by taioba
in thread Global variables in Perl
by taioba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |