On Fri, 26 Jul 2002 [EMAIL PROTECTED] wrote: > 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; >
Looks like a hash of hash references to me. **** [EMAIL PROTECTED] <Carl Jolley> **** All opinions are my own and not necessarily those of my employer **** _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs