in reply to Share Variable in Script with a Module
Output:package my_module; $VERSION = '1.00'; use strict; use warnings; our $gMessage; sub import { my $class = shift; $gMessage = shift; print "Yep, I'm in here ...\n\n"; my_sub(); } sub my_sub { print $gMessage; } 1;
Yep, I'm in here ... xyz
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Share Variable in Script with a Module
by DanielSpaniel (Scribe) on Oct 05, 2013 at 00:57 UTC | |
|
Re^2: Share Variable in Script with a Module
by DanielSpaniel (Scribe) on Oct 09, 2013 at 16:44 UTC | |
by tangent (Parson) on Oct 10, 2013 at 14:52 UTC | |
by DanielSpaniel (Scribe) on Oct 10, 2013 at 15:02 UTC |