Perl Programming/Keywords/reset

The reset keyword
The reset command clears variables and resets ?? at the end of a loop. It is generally used in a continue block. The EXPRESSION is understood as a list of single characters, where hyphens are allowed for ranges. It always returns 1.

All arrays and variables beginning with these characters in the current package are reset to their original state. Without the EXPRESSION, the one-time searches in the current package (?pattern?) are reset so that they can match again.

Before searching for a file with the <tt>.pm</tt> extension, <tt>reset</tt> searches first for a file with <tt>.pmc</tt> extension, loading it instead of the <tt>.pm</tt> file, if found.

Setting <tt>EXPRESSION</tt> to <tt>EXPRESSION</tt> is not recommended, as it wipes out the <tt>@ARGV</tt> and <tt>@INC</tt> arrays, and the <tt>%ENV</tt> hash.