Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

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.

Slashdot Top Deals

If you are good, you will be assigned all the work. If you are real good, you will get out of it.

Working...