note that $Start and $Finish are regexes in the OP, so you can't just use them as if they were strings (as hash keys), and you can't assume that the whole string in $line matches. (It's enough if a substring matches, unless the regexes contain anchors).