my $regexp = @ARGV[1]; ... next if ($global =~ /$regexp/o); ...