in reply to Getting range from N..end with list slice
Just a note: take care with using grep { defined } that way, for it might have odd side effects:
$ perl -wE '@x = qw"a b c d e f g h"; say 0+@x; say join ":", grep { d +efined } @x[4 .. 99]; say 0+@x;' 8 e:f:g:h 100 $
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting range from N..end with list slice
by ikegami (Patriarch) on Nov 27, 2010 at 21:38 UTC |