in reply to Re: I am now slice-aware
in thread I am now slice-aware
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: I am now slice-aware
by frankus (Priest) on Apr 17, 2001 at 19:10 UTC |