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