in reply to Strange behavior of array in scalar context

Stangely, the syntax :
$#executions
returns correctly 0

Replies are listed 'Best First'.
Re^2: Strange behavior of array in scalar context
by hippo (Archbishop) on Jan 26, 2026 at 10:32 UTC

    That indicates that the array does have one element.

    my @x = (); my @y = (99); print "x count is $#x, y count is $#y\n";

    results in

    x count is -1, y count is 0

    🦛