Name

store_lex

Synopsis

store_lex NAME, OBJECT
store_lex DEPTH, NAME, OBJECT
store_lex DEPTH, POSITION, OBJECT
               

Store an object as a lexical variable with a given name. If the symbol doesn’t exist, it will be created in the lexical scratchpad at the specified depth (a negative depth counts back from the current scope). If DEPTH isn’t provided, the symbol must already exist. If a position is provided instead of a name, the symbol will be stored at the given position in the scratchpad.

Arguments: S, P or I, I, P or I, S, P

See also: find_lex

Get Perl 6 and Parrot Essentials, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.