I have no idea why the error refers to $_[2], perhaps you'd like to file a bug reportIt is a bug, but not relating to reporting an index of 2 rather 0. The undef error is actually occuring at the last branch of the if/else tree (hence the 2, which features on that line - probably a mistake in the OP's code), but the wrong line number is being reported (a well-known and longstanding class of bug, will probably be fixed for 5.12.)
Dave.
In reply to Re^2: Weird undefined variable warning
by dave_the_m
in thread Weird undefined variable warning
by JStrom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |