neilwatson has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use warnings; my @array = qw(part1 part2 part3 part4 part5 part6 part7 part8 ); #remove part4 splice @array, 5, 1; print @array;
Now consider the output:
part1part2part3part4part5part7part8
Should part4 not have been removed from @array? I'm using perl 5.6.1.
Neil Watson
watson-wilson.ca
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Splice not working or is it me?
by George_Sherston (Vicar) on Sep 14, 2002 at 12:34 UTC | |
by guha (Priest) on Sep 14, 2002 at 17:05 UTC | |
|
Re: Splice not working or is it me?
by broquaint (Abbot) on Sep 14, 2002 at 12:39 UTC | |
|
Re: Splice not working or is it me?
by kabel (Chaplain) on Sep 14, 2002 at 12:37 UTC | |
|
Re: Splice not working or is it me?
by particle (Vicar) on Sep 14, 2002 at 17:05 UTC | |
|
Re: Splice not working or is it me?
by neilwatson (Priest) on Sep 14, 2002 at 16:35 UTC | |
by japhy (Canon) on Sep 14, 2002 at 16:42 UTC | |
by neilwatson (Priest) on Sep 14, 2002 at 16:49 UTC |