my @temparr = ($packets[$pnum] =~ /\Q$str\E/g);