foreach (keys %data) { next if (($_ eq 'aaa') || ($_ m/\[/) || ($_ m/\/) || $_ m/and/)); print "$_\n"; }