http://www.perlmonks.org?node_id=1019963


in reply to Re^2: Creating thread to call Subroutines parallely
in thread Creating thread to call Subroutines parallely

I cannot see anything obvious that might cause your output file to be empty -- other than perhaps there were no events that matched your criteria. Is that possible?

This is the error i am getting since the file app_output.txt is empty couldn't read C:\log_parsing\app_output.txt - at log_windows_new.pl line 444.

That still doesn't isn't the full error message.

Line 444 is:

my @a = read_file($outputfile1) or die "couldn't read $outputfile1 - $!"; # ........................................^^

The $! should mean that the full error message would be something like:

couldn't read C:\log_parsing\app_output.txt - No such file or director +y at log_windows_new.pl line 444. #.............................................^^^^^^^^^^^^^^^^^^^^^^^^ +^

Or perhaps:code> couldn't read C:\log_parsing\app_output.txt - Permission denied at log_windows_new.pl line 444. #.............................................^^^^^^^^^^^^^^^^^ </code>

That piece of information would likely point to the source of the problem; but you haven't given us it?

I'd also suggest that you add $^E to line 44 (and other error messages). Ie:

my @a = read_file($outputfile1) or die "couldn't read $outputfile1 - $! [$^E]";

That may provide further clarification of the problem.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.