in reply to removing elements from an array

If the sets of integers and/or strings are unique, that is w/o repetitions AND if you don't care about the order, then better use a hash to hold the data.

your problem could easily be solved with:

%hash=@array; @ints = keys %hash; @strs = values %hash;

for the second case (unique strings) use reverse

%hash= reverse @array; @strs = keys %hash; @ints = values %hash;

test in debugger:

DB<103> %hash = reverse qw/1 A 2 B 3 C 4 D 5 E/ => ("E", 5, "D", 4, "C", 3, "B", 2, "A", 1) DB<104> keys %hash => ("A", "C", "D", "B", "E") DB<105> values %hash => (1, 3, 4, 2, 5)

Cheers Rolf