in reply to Delete/Add a string in an array

You've got a few answers pointing you at the array manipulation functions, but I wonder if they're missing the main point of your question. Reading between the lines, I suspect that you actually want changes that you make to the array to be stored in alternate.pl, so that you get the altered array the next time that you run your program.

If that's the case, then you might be better off storing your data in a text file and manipulating it as an array using Tie::File.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg