Generally used in acontinue block at the end of a loop to clear variables and resetm?pattern? searches so that they work again. The expression is interpreted as a list of single characters (hyphens allowed for ranges). All variables (scalars, arrays, and hashes) in the current package beginning with one of those letters are reset to their pristine state. If the expression is omitted, one-match searches (m?pattern?) are reset to match again. Only resets variables or searches in the current package. Always returns 1. Examples:
reset 'X'; # reset all X variablesreset 'a-z'; # reset lower case variablesreset; # just reset m?one-time? searchesResetting"A-Z" is not recommended because you'll wipe out your@ARGV and@INC arrays and your%ENV hash.
Resets only package variables; lexical variables are unaffected, but they clean themselves up on scope exit anyway, so you'll probably want to use them instead. Seemy.
Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via theGitHub issue tracker oremail regarding any issues with the site itself, search, or rendering of documentation.
The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via thePerl issue tracker, themailing list, orIRC to report any issues with the contents or format of the documentation.