pbradley has asked for the wisdom of the Perl Monks concerning the following question:
the test.pl file:package framework; use strict; my $date = "2001-11-12"; sub testcase1 { print $date; }
the output after running this test is 2001-11-122001-11-12. the date is not being changed like I thought it would be. Does anybody know of an easy way for me to access and change frameworks $date variable from within the test.pl? Any help would be greatly appreciated. thanks.require "framework.pl"; $framework::date = "2001-12-05"; &framework::testcase1; $framework::date = "2001-11-15"; &framework::testcase1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: package/scope question
by davorg (Chancellor) on Nov 16, 2001 at 21:42 UTC | |
|
(jeffa) Re: package/scope question
by jeffa (Bishop) on Nov 16, 2001 at 21:22 UTC | |
by pbradley (Initiate) on Nov 16, 2001 at 21:44 UTC | |
by jeffa (Bishop) on Nov 16, 2001 at 21:52 UTC | |
by pbradley (Initiate) on Nov 16, 2001 at 21:49 UTC |