Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Autovivify definition

by tomazos (Deacon)
on Sep 20, 2005 at 23:28 UTC ( #493619=note: print w/replies, xml ) Need Help??

in reply to Should calling 'exists' create a hash key?

Autovivify in this usage is a term coined to mean that perl automatically creates a variable the first time you talk about it. Vivify means to "bring to life" (or worse "to operate on something while it is alive"). Tack on "auto" and you get the general idea.

If you do not assign to a newly autovivified variable it will default to the undefined value (undef).

use strict and use warnings help.

The difference between (a) a hash key that exists and is defined, (b) a hash key that exists and is not defined, and (c) a hash key that does not exist - is a common point of confusion.


Andrew Tomazos  |  |

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://493619]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2020-05-27 07:36 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (153 votes). Check out past polls.