me.pl23note345sente you.pl25warning355sente hi.pl21note358sente she.pl123warning3583sente they.pl231warning3582sente them.pl26note3358sente #### you.pl 24-28 they.pl 36 them.pl 44-49 you.pl 234 77 #### you.pl25warning355sente #### open(CHANGES, "< $linesChangedList") or die "could not open file"; my $myFile = $myFile0; while () { chomp; $info = $_; # is it a range or a single line? if ($info =~ /(\d+)-(\d+)/) { $changes{$myFile0} .= " ".join(" ",($1 .. $2))." "; } else { $changes{$myFile0} .= " $info "; } } close(CHANGES); while () { chomp; # split the line from the wave characters my ($file, $line, $type, $rest) = split(/~/, $_, 4); # was this file found in the previous loop? if (defined $changes{$file}) { # was it a range? if (defined $changes{$file}->[1]) { # skip if this $line is not in this range next unless ($line gt $changes{$file}->[0] and $line lt $changes +{$file}->[1]); } else { # skip if this $line is not equal to this single line number next unless $line eq $changes{$file}->[0]; } # if we are here, then this is a match. so print it. print "$_\n"; } }