Help for this page

Select Code to Download


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