in reply to Passing Variables
#!/usr/bin/perl use strict; use warnings; use PackageName; our $shared = "Hello World!\n"; my $returnedValue = PackageName->routine(); print $returnedValue; __END__
This maybe what your looking for.package PackageName; sub routine { print $main::shared; return "Done\n"; } 1;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Passing Variables
by hlen (Beadle) on Oct 23, 2004 at 22:17 UTC | |
Re^2: Passing Variables
by pg (Canon) on Oct 23, 2004 at 22:19 UTC |