schrodycat has asked for the wisdom of the Perl Monks concerning the following question:
but instead I typed:@a = (0..9) @a[4,5,6] = qw/a b c/
And instead of the result 0123abc789, the actual result was 012345c789. Can anyone explain why the improper slice did what it did?$a[4,5,6] = qw/a b c/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Improper slicing
by japhy (Canon) on Apr 24, 2006 at 14:34 UTC | |
by bobf (Monsignor) on Apr 24, 2006 at 15:01 UTC | |
by japhy (Canon) on Apr 24, 2006 at 15:04 UTC | |
by schrodycat (Sexton) on Apr 24, 2006 at 19:05 UTC | |
|
Re: Improper slicing
by Khatri (Scribe) on Apr 25, 2006 at 17:44 UTC |