RE: [Perl-unix-users] deleting from array

2004-10-25 Thread Keirnan, Paul
You may also find this useful. Regards, Paul From: Bruce Hudson [EMAIL PROTECTED] Sent: Friday, 6 September 2002 10:29 PM To: Keirnan, Paul Subject:Re: [Perl-unix-users] Re: Remove item from array > That is, create a new array without one of the elements. > > I then made it look

Re: [Perl-unix-users] deleting from array

2004-10-25 Thread michael higgins
Pasi Valkeila wrote: Morjesta vaan! How can I delete a value from the middle of an array so that the array shortens by one? Like this (1, 2, 3, 4, 5, 6, 7) > (1, 2, 3, 5, 6, 7) Pauli my @t = (1, 2, 3, 4, 5, 6, 7); splice @t, 3, 1; print join ', ', @t; # > (1, 2, 3, 5, 6, 7) -- mike hi

Re: [Perl-unix-users] deleting from array

2004-10-25 Thread $Bill Luebkert
Pasi Valkeila wrote: > Morjesta vaan! > > How can I delete a value from the middle of an array so that the array > shortens by one? > > Like this > > (1, 2, 3, 4, 5, 6, 7) > (1, 2, 3, 5, 6, 7) splice is your friend. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTE