if ($line =~ /$RE{num}{real}\s+($RE{num}{real})\s..+($RE{num}{real})+/){ my $start = $1 && my $end = $2; ## Once captured how do I continue to the next line to query if the ## value is - or + of the start and end values }