Alberta226 has asked for the wisdom of the Perl Monks concerning the following question:
Hiya PerlMonks!
I have this code:
It is suppose to remove the first three sets of information from the list leaving purple, pink and white. Instead I get oranglepurplepinkwhite Any ideas?#!/usr/bin/perl use warnings; use strict; ############################################################# # Array splicing # Removing elements then returning more than one element at a time ############################################################# my @colors = ("red", "blue", "orange", "purple", "pink", "white"); splice(@colors, 0, 2); print @colors;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Array Splicing: Need Help!
by Hena (Friar) on May 26, 2005 at 08:48 UTC | |
by reasonablekeith (Deacon) on May 26, 2005 at 09:15 UTC | |
Re: Array Splicing: Need Help!
by monkfan (Curate) on May 26, 2005 at 09:32 UTC | |
by Anonymous Monk on May 26, 2005 at 15:05 UTC | |
by chromatic (Archbishop) on May 26, 2005 at 21:16 UTC | |
Re: Array Splicing: Need Help!
by rupesh (Hermit) on May 26, 2005 at 09:25 UTC |
Back to
Seekers of Perl Wisdom