in reply to Re^2: Why is Dumper returning "!!1" for true file test?
in thread Why is Dumper returning "!!1" for true file test?
I hope it's clear that ! is just the logical negation operator.
Double negations are a very common idiom, you will find it in many languages, also in JS.
!!$a is in the same idiomatic niche like 0+$a or "".$a of explicit casting to a certain type without altering the value. Just Boolean now instead of number or string.
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Why is Dumper returning "!!1" for true file test?
by nysus (Parson) on Jan 20, 2024 at 22:51 UTC |