Re: perl hash in hash problem
vivek khurana <khuranavivek_in-/[email protected]> Fri, 12 Nov 2004 15:00:11 -0800 (PST)
| Newsgroups | gmane.user-groups.linux.delhi.devel |
|---|---|
| Message-ID | <[email protected]> |
--- Gurpreet Sachdeva <[email protected]> wrote: > On Thu, 11 Nov 2004 vivek khurana wrote : > >>>Now my problem is how do i refer to vals in the > code > >>>to create the hash. > > Vivek, Referencing can solve your problem... > > sub foo > { > open( FH, "< myfile" ) or die "Can't open > $file : $!"; > while( <FH> ) { > read $val; > > $HoH{ $col_selection }{ 'val' } = $val; > } > close FH; > > return \%HoH; > } > > Refer: > http://www.cs.mcgill.ca/~abatko/computers/programming/perl/howto/hash/ > > HTH... > > Do let me know if that solved your problem? No, as i am not calling a function. This code snippet belongs to a HTML::Mason code calling a fuction is not easy. But my problem got solved as per my previous reply. Regards VK ===== Hug the REALITY ;-) Disclamer The facts expressed here belong to everybody, the opinions to me. The distinction is yours to draw... __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com