10.5. Hash in scalar context

Previously we saw that a hash in LIST context returns its keys and values.

In SCALAR context:

if (%h) {
    # the hash is not empty
}

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