in reply to Speeding up my script
Oddly printing to stdout takes alot of time on windows xp. It might be even worse on vista. (I wouldn't know im still waiting another year for yet another micro-slow product to be beta tested) You might want to try Tee from cpan. I use it to print to both file and stdout to debug then turn it off and print to logfile only when im finished debugging.
Alternatively you could also try to save the output into an array and then print out the array when the program is done.
Although i doubt it will speed it up much. It is probably use Win32::OLE i would try the recommended alternatives.
use IO::Tee; open my $ofh, '>>', 'LOGFILE.txt' or die "Cannot append to 'LOGFILE.tx +t':$!"; my $tee = IO::Tee->new(\*STDOUT, $ofh); # Prints to both file and stdo +ut #my $tee = IO::Tee->new(\*$ofh);Prints to file only print $tee "Opening $name";
|
|---|