Re: perl hash in hash problem
"Gurpreet Sachdeva" <[email protected]> 11 Nov 2004 15:54:29 -0000
| Newsgroups | gmane.user-groups.linux.delhi.devel |
|---|---|
| Message-ID | <[email protected]> |
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?
Cheers!
«·´`·.(*·.¸(`·.¸ ¸.·´)¸.·*).·´`·»
«.....[ Garry ].....»
«·´`·.(¸.·*(¸.·´ `·.¸)*·.¸).·´`·»