develooper Front page | perl.beginners | Postings from February 2002

Use of Spllic command

Thread Next
From:
Kevin Butters
Date:
February 12, 2002 14:46
Subject:
Use of Spllic command
Message ID:
20020212224645.22763.qmail@web21204.mail.yahoo.com
A real beginner here.

I have an array with 5 elements, 0-4. I want to insert
values into the array at position 2. Do I use the
splice command?

splice(@array, 1, "value");
print "@array\n";
0 1 2 3 4 5

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About