Hi Guys
I know this looks like a cgi problem but I believe it is more of a varable
scoping problem I just happen to be having with the CGI module. While I am
waiting for answers to this I am off to buy the most reccomended ""Learning
Perl" book. Thanks for any help
I have this code.
require "$LIBRARY_DIR/castime_html.pm";
use CGI; # load CGI routines
use strict 'vars';
my $q = new CGI; # create new CGI object
if (! $q->param()) {
&draw_tnc();
}
So far so good except &draw_tnc() is in the required file castime_html.pm
and cannot access $q
error is
Can't call method "header" without a package or object reference at
castime_html.pm line 29.
I need the subs in the required file to have access to all methods and
values in the $q object.
How do I do this?
Resources that explain when and why to use variable scope would be
appreciated, I have read heaps on what scope applies but need to get my
brain around the philosophy of it all.
Thanks