W
William
basically %USERACL is a hash containing the key and values read from the
following file:
UserID=LoginID:Group:Name:Emailassword:IsAdmin:Status:Servers:Lists:Logs:Macros:Eod:FileMgr:MacroListnL:EditPnL:BO
AADUBLINJORDAN=AADUBLINJORDAN:BO:AADUBLINJORDAN:AADUBLINJORDAN:XEV5iEfluxjWM:::::::::[]:[]:[]:
CHANKN=CHANKN:SYS:Kenneth Chan:[email protected]:XECiTZAqeyBjE:1:1::1:1:1:1:1:[]:[]:[]:
now for test.pl:
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5 use CGI;
6
7 require "./mxrt_auth.pl";
8
9 my $query = new CGI;
10 my %USERACL = initAuthMgr($query); (see NOTE1 for initAuthMgr)
11
12 while ( (my $key, my $value) = each %USERACL) {
13 print "$key = $value\n";
14 }
15
Question #1) The following error was generated by "use warnings;"
[mk_murex@mkmxg00 /mkapp/webapps/mxrt-cgi/upload_repo 12:45:03]$ ./test.pl
/usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
/usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at
../test.pl line 4.
BEGIN failed--compilation aborted at ./test.pl line 4.
NOTE1: for line 10 of test.pl:
mxrt_auth.pl::initAuthMrg is defined as follows:
sub initAuthMgr {
($AUTHQ) = @_;
%AUTH_INFO = $AUTHQ->cookie('MXRT_USERACL');
foreach (keys %AUTH_INFO) {
print ($AUTH_INFO{$_})."<br>";
}
return %AUTH_INFO;
}
Question #2) nothing is printed by line 12-14 of test.pl. (Even
without the line "use warnings;")
Why???
Expected output of the following script - test.pl:
IsAdmin=1
Status=1
Servers=1
....
following file:
UserID=LoginID:Group:Name:Emailassword:IsAdmin:Status:Servers:Lists:Logs:Macros:Eod:FileMgr:MacroListnL:EditPnL:BO
AADUBLINJORDAN=AADUBLINJORDAN:BO:AADUBLINJORDAN:AADUBLINJORDAN:XEV5iEfluxjWM:::::::::[]:[]:[]:
CHANKN=CHANKN:SYS:Kenneth Chan:[email protected]:XECiTZAqeyBjE:1:1::1:1:1:1:1:[]:[]:[]:
now for test.pl:
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5 use CGI;
6
7 require "./mxrt_auth.pl";
8
9 my $query = new CGI;
10 my %USERACL = initAuthMgr($query); (see NOTE1 for initAuthMgr)
11
12 while ( (my $key, my $value) = each %USERACL) {
13 print "$key = $value\n";
14 }
15
Question #1) The following error was generated by "use warnings;"
[mk_murex@mkmxg00 /mkapp/webapps/mxrt-cgi/upload_repo 12:45:03]$ ./test.pl
Can't locate warnings.pm in @INC (@INC contains:output.txt
/usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
/usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at
../test.pl line 4.
BEGIN failed--compilation aborted at ./test.pl line 4.
NOTE1: for line 10 of test.pl:
mxrt_auth.pl::initAuthMrg is defined as follows:
sub initAuthMgr {
($AUTHQ) = @_;
%AUTH_INFO = $AUTHQ->cookie('MXRT_USERACL');
foreach (keys %AUTH_INFO) {
print ($AUTH_INFO{$_})."<br>";
}
return %AUTH_INFO;
}
Question #2) nothing is printed by line 12-14 of test.pl. (Even
without the line "use warnings;")
Why???
Expected output of the following script - test.pl:
IsAdmin=1
Status=1
Servers=1
....