prad_intel has asked for the wisdom of the Perl Monks concerning the following question:
Fellow monastery wanderer ,
I just fumbled a way in blending arrays and hashes , I am naive to estimate whether this is a right way of doing... whatever is seen below( is what i meant ).
There cannot be a better judge than you , so please integrate your comments.
Its fun to code perl even when its going wrong ! Regards Pradfor($i=0;$i<=5;++$i){ print"\nEnter the $i th value which you need to append in hash: "; chomp($table_value[$i]=<STDIN>); } %new_hash_experiment=( "aa",$table_value[0], "ab",$table_value[1], "ac",$table_value[2], "ad",$table_value[3], "ae",$table_value[4], "af",$table_value[5]); foreach (sort keys %new_hash_experiment) { print "$_ contains $new_hash_experiment{$_}\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: arrays and hashes blended !
by jeffa (Bishop) on Sep 29, 2005 at 13:32 UTC | |
Re: arrays and hashes blended !
by osunderdog (Deacon) on Sep 29, 2005 at 13:35 UTC | |
by prad_intel (Monk) on Oct 03, 2005 at 06:08 UTC | |
Re: arrays and hashes blended !
by Roy Johnson (Monsignor) on Sep 29, 2005 at 14:12 UTC | |
Re: arrays and hashes blended !
by Anonymous Monk on Sep 29, 2005 at 13:42 UTC |
Back to
Seekers of Perl Wisdom