in reply to Fast/efficient way of check if a string in an strArr is contained in a line

cpomp,
First, there is more than a nominal amount of time spent calling check_bypass() millions of times so it would be best to inline that code. It would be better if your skip file contained exact matches instead of regular expressions because then you could just say next if $skip{$_}; Instead, I would suggest the following (untested):
#!/usr/bin/perl use strict; use warnings; use Regexp::Assemble; my $skip_file = $ARGV[0] or die "Usage: $0 <skip_file>; my $ra = Regexp::Assemble->new(); $ra->add_file($skip_file); my $skip = $ra->re; open(my $fh, '<', 'log.txt') or die "Unable to open 'log.txt' for rea +ding: $!"; while (<$fh>) { next if /$skip/; print; }

Minor addition: Depending on the contents of your skip file, there are other modules that may be a better choice but only you would know that unless you share examples.

Cheers - L~R