You will see all of these idioms used to test whether an array is empty.
if (!@match)
if (@match == 0)
if (scalar @match == 0)
In scalar context, an array is evaluated as the number of elements it contains.
You will see all of these idioms used to test whether an array is empty.
if (!@match)
if (@match == 0)
if (scalar @match == 0)
In scalar context, an array is evaluated as the number of elements it contains.