Dear All,
This is the Data structure that i am using it. I am facing some serious
problem with the reference to an array of array-references.
Please help me to solve this problem.
Data Structure
%CIAUDIT = (
pons => {
NAME => "Ponnambalam M A",
EMAIL => "ponnam.balam\@philips.com",
PROJECT => "SDE",
CHECKEDOUTS => [
["PONS","/pons/pons2/pons.txt","12-jan-02:12:13:20","/main","pons_view","FORTYEIGHT",],
["PONS",
"/philips/psd.txt","12-jan-02:12:13:20","/main","pons_view","WEEK",],
["PONS",
"/pns/ps2/pns.txt","12-jan-02:12:13:20","/main","pons_view","MONTH",],
],
},
jayanthi => {
NAME => "Jayanthi",
EMAIL => "ljayanthi\@rediffmail.com",
PROJECT => "XXX",
CHECKEDOUTS => [
["PONS","/pons/pons2/pons.txt","12-jan-02:12:13:20","/main","pons_view","FORTYEIGHT",],
["PONS",
"/philips/psd.txt","12-jan-02:12:13:20","/main","pons_view","WEEK",],
["PONS",
"/pns/ps2/pns.txt","12-jan-02:12:13:20","/main","pons_view","MONTH",],
],
},
arunram => {
NAME => "PONS ARUNRAM",
EMAIL => "arunram\@pons.com",
PROJECT => "AAA",
CHECKEDOUTS => [
["PONS","/pons/pons2/pons.txt","12-jan-02:12:13:20","/main","pons_view","FORTYEIGHT",],
["PONS",
"/philips/psd.txt","12-jan-02:12:13:20","/main","pons_view","WEEK",],
["PONS",
"/pns/ps2/pns.txt","12-jan-02:12:13:20","/main","pons_view","MONTH",],
],
},
);
Doubt:
- I am using one more library in which i have to supply the
reference to an array of array-references as a input
CODE:
foreach $user(keys %CIAUDIT)
{
$rec = $CIAUDIT{$user}; # temp pointer
$data = @{$rec->{CHECKEDOUTS} };
##### ERROR : Here i have to pass the CHECKEDOUTS
of each user as a reference to an array of ###
array-references
$t = new Data::Table($data, $header, 0);
print HTML $t->html;
}
ERROR : ( i am getting this error when i ran this code )
Can't use string ("3") as an ARRAY ref while "strict
refs" in use at C:/Perl/site/lib/Data/Table.pm line 28.
Note : The same code is working with the independent reference to
an array of array-references .
Working code :
use Data::Table;
$header = ["Element Name", "Checkedout on","CO BRANCH","CO
VIEW","CATEGORY",];
$data = [
["/temp/file1.txt","12-jan-02:23:33:33","main","pons_view","+"],
["/temp/file2.txt","12-jan-02:23:33:33","main","pons_view","++"],
["/temp/file3.txt","12-jan-02:23:33:33","main","pons_view","+++"],
];
$t = new Data::Table($data, $header, 0);
print HTML $t->html;
With Regards,
Pons.
____________________________________________________
Ponnambalam. M.A.
Philips Medical Systems,
Philips Innovation Campus,
#1,Murphy Road, Ulsoor.
Bangalore - 560008. INDIA
Phone : +91- 080 - 557 9000 Extn: 1013
E-mail: [EMAIL PROTECTED]
____________________________________________________
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs