in reply to splice help - deleting specific element

It seems to work for me if I use warnings; use strict;, then change != to ne:
use strict; use warnings; use Data::Dumper; my $co = 'b'; my @allcompanies = qw(a b c d); print Dumper(\@allcompanies); @allcompanies = grep { $_ ne $co } @allcompanies; print Dumper(\@allcompanies); __END__ $VAR1 = [ 'a', 'b', 'c', 'd' ]; $VAR1 = [ 'a', 'c', 'd' ];