10.7. exists, delete hash element

my %phones;
$phones{Foo} = '111';
$phones{Bar} = '222';
$phones{Moo} = undef;

if (exists $phones{Foo}) {
    if (defined $phones{Foo}) {
    }
}

delete $phones{Foo};

If you are interested in on-site trainings by the author, please contact me directly.

Online courses:

Would you like to get
updated when I publish
the next article?

Follow me:

Google Plus Twitter RSS feed