http://qs321.pair.com?node_id=586680


in reply to Increasing the efficiency of the code

I don't know if it would actually increase performance but since the whole thing seems to be about wrapping from numerical to string context that gave me an idea. If you implemented a hash with the numerical operators as keys and the string operators as their corresponding values couldn't you rewrite the whole if elsif else etc construct as:
if (eval "$conwithposition{$key_pos}[1] $mapContext{$conwithposition{$ +key_pos}[0] $line[$key_pos]"){ foreach $col(sort {$a<=>$b} keys(%cols_pos)){ push @tmparr,$line[$col]; } $tmparr=join("|",@tmparr); push @listcols,$cols_pos{$col}; push @result_arr,[ $tmparr ];

--
"WHAT CAN THE HARVEST HOPE FOR IF NOT THE CARE OF THE REAPER MAN"
-- Terry Pratchett, "Reaper Man"