in reply to
switching array entries
Hi, ++
zigdon
,
You can even do it on one go.
splice(@array,1,0,splice(@array,4,1) );
[download]
cool he,
---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters
, Belgium
Comment on
Re: switching array entries
Download
Code
Replies are listed 'Best First'.
Re: Re: switching array entries
by
hotshot
(Prior)
on Oct 30, 2002 at 14:46 UTC
thanks for your answer, but pay attentions that if $indexFrom is smaller than $indexTo, we have to susbstruct 1 in the the outer splice's offset.
Hotshot
[reply]
In Section
Seekers of Perl Wisdom