Greetings to all,
I am having a problem when accessing the data from a PM file. Unless I actually put a value into the scalar there is NO data.
I have used
require before with no problems . I dont understand what I have done that could break it.
Anyway this is what the print statement says.
$smonth is ,$sday is 2, $syear is 2000
I was hoping that $smonth value would be "
Jun" not "".
Thanks for any help
Tim
#!/usr/local/bin/perl -w
use strict;
use diagnostics;
use CGI qw(:standard);
print header();
require schedule;
my $s_month;
my $s_day = 2 ;
my $s_year = 2000;
print "\$smonth is $s_month ,\$sday is $s_day, \$syear is $s_year\n";
################### PM FILE #########################
#schedule
$s_month = 'Jun';
$s_day = '21';
$s_year ='2004';
$week_1 = 'TEAM 1';
$week_2 = 'TEAM 2';
$week_3 = 'TEAM 3';
$week_4 = 'TEAM 4';
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.