- or download this
$found = 0;
@list = grep { $item ne $_ || $found++ } @list;
- or download this
my ($index) = grep { $item eq $list[$_] } 0..$#list;
splice(@list, $index, 1) if defined $index;
- or download this
use List::Util qw( first );
my $index = first { $item eq $list[$_] } 0..$#list;
splice(@list, $index, 1) if defined $index;
- or download this
use strict;
use warnings;
...
print("\n\n");
print("The XS versions of List::Util and List::MoreUtils were used.\n"
+);
- or download this
Verify:
...
The XS versions of List::Util and List::MoreUtils were used.