in reply to problem with accessing PM file
When you declare the variables with my, Perl considers those values more important than the variables in the required file.
use vars '$foo'; $foo = 'foo'; { my $foo = 'bar'; print "'$foo'\n"; }
The quick solution is something like this:
use vars qw( $s_month $s_day $s_year $week_1 $week_2 $week_3 $week_4 ); requre schedule; $s_day = 2; $s_year = 2000; print "\$smonth is $s_month ,\$sday is $s_day, \$syear is $s_year\n";
A better answer may be using Exporter to export values from your schedule package into the namespace. Of course, looking at the values in schedule, I'm inclined to recommend:
use vars qw( %s @weeks ); %s = ( month => 'Jun', day => 21, year => 2004, ); @weeks = ( 'TEAM 1', 'TEAM 2', 'TEAM 3', 'TEAM 4' );
|
|---|