| [EMAIL PROTECTED]
UCIS, Networks and Systems |
Dalhousie University|
Halifax, Nova Scotia, Canada| (902) 494-3405
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Pasi Valkeila
Sent: Tuesday, 26 October
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
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
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
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listser