in reply to deleting a specific element from an array

List::Compare's get_unique member may help.

use strict; use warnings; use List::Compare; my @array=('water','wine','apple','beer','orange'); my @dels=('apple','orange'); my $lc = List::Compare->new( { lists => [\@array, \@dels] } ); print join ', ', $lc->get_unique ();

Prints:

beer, water, wine

Perl's payment curve coincides with its learning curve.