##
if ($info =~ /(\d+)-(\d+)/) {
$changes{$file} .= " ".join(" ",($1 .. $2))." ";
} else {
$changes{$file} .= " $info ";
}
####
...
if (defined $changes{$file}) {
# skip if this $line isn't mentioned in $changes
next unless ($changes{$file} =~ / $line /);
}
...