start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: require Chapter 5
Function Reference
Next: Reference: return
 

reset

reset 
expr

Used at the top of a loop or in a continue block at the end of a loop, to clear global variables or reset ?? searches so that they work again. expr is a list of single characters (hyphens are allowed for ranges). All scalar variables, arrays, and hashes beginning with one of those letters are reset to their pristine state. If expr is omitted, one-match searches ( ? PATTERN ? ) are reset to match again. The function resets variables or searches for the current package only. It always returns 1 .

Lexical variables (created by my ) are not affected. Use of reset is vaguely deprecated.


Previous: Reference: require Perl in a Nutshell Next: Reference: return
Reference: require Book Index Reference: return

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.