agustina_s has asked for the wisdom of the Perl Monks concerning the following question:
in Perl??? I only know that in C we have switch(case) like that. In this case I have a hash table %house containing around 30 elements. And for each of the key value of the hash I must check each key.. eg:switch(case) case A :do somehing case B :do some other thing
It takes a long time to compile my program. I really wish there is something better to make my prog faster. Please help me.... Thanks a lot.foreach $person (keys %house){ { if $person eq "CC"){ print "My name "; p_CC();} elsif $person eq "AB"){ print "AB "; p_AB();} elsif $person eq "CD"){ print "My friend "; p_CD();} .... ##for the whole element else ... }
|
---|