While trying to generate some data from some log files it seems like the variable 'count', as can be seen the code below never prints anything. There some few other problems mostly with variables. For instance, 'previous_date' never prints anything while the new line immediately after it does print. Could anything have a clue what is happening here?

Thought someone might find this interesting and even suggest possible solutions.

It has not been possible for me to produce a smaller example that demonstrates this issue but for someone who is familiar with Perl, it would probably be easy to pick out the issue.

Code:
use strict;
use warnings;

sub GenerateData() {
    my $file = 'patch_log.txt';
    my $count = 0;
    my $date = "";
    my $previous_date = "";
    my $patch_file = 'patch_file.txt';
    open my $overview, $patch_file or die "Could not open $patch_file: $!";
    open my $info, $file or die "Could not open $file: $!";
    while (my $line = <$info>) {
           if ($line =~ /^changeset/)
           {
            $count = $count + 1;
            while ( $line = <$info>) {
                if ($line =~ /^user/)
                {
                    my $author = substr($line, 10);
                    
                    print $author;
                }

                if ($line =~ /^date/)
                {
                    print $date;
                    $previous_date = $date;
                    print $previous_date;

                    my $date = substr($line, 10, 14);
                    
                    print $previous_date;
                    #print $date;
                    #print "\n";
                }
            }

           print $count;
        }

        else
        
        {
            continue;
        }

        last if $. == 20000;
    }

    close $info;
}

GenerateData()