I just had one of those Pascal flashbacks. In Pascal, the function to reset the filehandle is called, well uhm, reset
.
In perl, you do a seek
on the filehandle and move the line pointer. It turns out reset
is also a valid function. I must admit I never used reset before (I think/hope).
Reset is
generally used in a "continue" block at the end of a loop to clear variables and reset "??" searches so that they work again.Am I now a bad perl programmer or am I not the only one who has never used this?
'reset' with arguments is even more fun.
Perhaps the documentation should say no-one actually uses reset.