Reset?

Beatnik on 2006-01-04T14:46:14

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?


__

Abigail on 2006-01-04T17:02:51

No, you're not the only one. I doubt there are many people who have ever used it, and I'd be surprised if there were more than a dozen programs in the world that would break if 'reset' would disappear from the next version of Perl.

'reset' with arguments is even more fun.

Perhaps the documentation should say no-one actually uses reset.