$count = ($line =~ s/use [^;]+ ;//gxms); $total += $count;