Comment Re:Horrible Code I must debug (Score 1) 164
I really don't think that the original coder understood Perl, and attempted to use principals from other languages, and very badly at that.
for($tmp=0;@tmp>$tmp;++$tmp) { tool_call($tmp[$tmp][0],$tmp[$tmp][1],$tmp[$tmp ][2],$tmp[$tmp][3],$tmp[$tmp][4],$tmp[$tmp][5],$tm p[$tmp][6],$tmp[$tmp][7],$tmp[$tmp][8],$tmp[$tmp][ 9],$tmp[$tmp][10]);
}
would be FAR neater as:
for (@tmp) {
tool_call($_[0..10]);
}
though even that falls into Perls "default argument" trap - a far better method (for all of Perl) is to not use $_ at all, and extract the arg into a well named my() scalar.
for($tmp=0;@tmp>$tmp;++$tmp) { tool_call($tmp[$tmp][0],$tmp[$tmp][1],$tmp[$tmp ][2],$tmp[$tmp][3],$tmp[$tmp][4],$tmp[$tmp][5],$t
would be FAR neater as:
for (@tmp) {
tool_call($_[0..10]);
}
though even that falls into Perls "default argument" trap - a far better method (for all of Perl) is to not use $_ at all, and extract the arg into a well named my() scalar.