Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My requirment is instead of using a predefined HoH ($Tech_fy_reldata{$val[$npo]}{$val[$fy_closed]}[0] = '0';) , I need to create the same kind of output for more no of key is more levels of hash dynamicaly.open (NEW , "< /text.txt"); while(<NEW>){ @val=split /\t/; $Tech_fy_reldata{$val[$npo]}{$val[$fy_closed]}[0] = '0'; } ________OUTPUT_______ $VAR5 = 'Data'; $VAR6 = { '2007' => [ '0' ] }; $VAR7 = 'DataBase'; $VAR8 = { '2005' => [ '0' ], '' => [ '0' ], '2007' => [ '0' ], '2004' => [ '0' ], '2006' => [ '0' ] };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Generating HoH...
by liverpole (Monsignor) on Dec 10, 2006 at 13:58 UTC | |
|
Re: Generating HoH...
by johngg (Canon) on Dec 10, 2006 at 13:01 UTC | |
|
Re: Generating HoH... (dive)
by tye (Sage) on Dec 10, 2006 at 18:43 UTC | |
|
Re: Generating HoH...
by ikegami (Patriarch) on Dec 11, 2006 at 02:19 UTC |