Hi Everyone,

I am new to this list and have a strange question for you.

I am calling a subroutine in a while loop. However in the output only
one line is printed.  If I print to screen all information prints out.

Here is the code

The line print "$tmp[0]\n"; prints all out put to screen.



opendir DIR, $dir;
        while ($file = readdir DIR) {
                next if $file !~ /$date\-\d{6}\.general/;
        open LOGFILE, "$dir/$file" or die "Can't open $dir/$file :$!\n";

        while (<LOGFILE>) {

        $tmp = <LOGFILE>;

        next if $tmp !~ /were not handled on loop/;


                @tmp = split (/Items\:/,$_);
                $tmp[0] =~ s/\:/\ /g;
                $tmp[0] =~ s/jobId\[/\ /g;
                $tmp[0] =~ s/\]/\ /g;
                $tmp[0] =~ s/\[/\ /g;
                print "$tmp[0]\n";

        if ($errorlist) {
                &ProcessEmail;
        else {exit;}

        }

}
        close LOGFILE;



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to