Serpent7776 avatar

#TIL about #perl defined-or operator //. This will evaluate $ENV{HOME} and return ...

serpent7776

Published: 22 Jul 2024 › Updated: 22 Jul 2024#TIL about #perl defined-or operator //.
This will evaluate $ENV{HOME} and return ...

#TIL about #perl defined-or operator //. This will evaluate $ENV{HOME} and return ...

... it if it's defined. Otherwise will evaluate $ENV{LOGDIR} and return that if defined and so on.
Basically coalesce operator for undef values.



Leave #TIL about #perl defined-or operator //. This will evaluate $ENV{HOME} and return ... to:

Written by

I like programming languages.

Read more #til posts


Best Posts From Serpent7776

We have not curated any of serpent7776's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Serpent7776