in reply to delete an element from an array

This is a "one liner" with List::MoreUtils. Turning it into an example program:

#!/usr/bin/perl use warnings; use strict; use List::MoreUtils qw/ uniq /; my @TERMS = ( 1,2,7,2,4,5,3,4,2,2,4,27,81,3 ); my @INDEX = uniq @TERMS; print "(", join( ',',@INDEX), ")\n";
And the output is:

C:\Code>perl uniqarray.pl (1,2,7,4,5,3,27,81)