Also works for "highest index" rather than "number of elements":
>perl -wMstrict -lE "say scalar $#{[ 'aa' .. 'zz' ]}; " 675
In reply to Re^3: Array length with range operator
by AnomalousMonk
in thread Array length with range operator
by gurpreetsingh13
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |