You're missing the fact that split /:/ throws away any empty elements at the end of the string.
Try this:
--$_ = '1:2:3:::::'; my @a = split /:/; print scalar @a; # prints 3
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: Re: I am now slice-aware
by davorg
in thread I am now slice-aware
by birdbrane
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |