wh wrote:

> This works but it can't be this easy, so tell this true beginner what's
> wrong with it!  I checked it with print "@array\n"; and got an error message
> about an "uninitialized value in join or string" I don't know how to deal
> with.
>
> @array = (1, 2, 3, 4, 5);
> delete $array[2];

Try this:

  @array = (1, 2, 3, 4, 5);
  splice @array, 2, 1;

Is that what you wanted?
See perldoc -f splice
http://www.perldoc.com/perl5.6.1/pod/func/splice.html

- RaFaL Pocztarski, [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to