Chat Place Forum

Forum for general chat. Welcome to chat place forum

It is currently Fri May 10, 2024 6:44 pm
---------->CLICK HERE TO CHAT LIVE NOW<----------





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Perl interaction with stdout?
PostPosted: Fri Jun 05, 2009 9:34 am 
Offline
Newbie

Joined: Fri Jun 05, 2009 9:34 am
Posts: 1
When I have a perl script chugging away at a large amount of data, I'd like more visual feedback than a blinking hdd light.

I've tried to make a simple progress indicator that just adds a dot while it's working:

..................................

but it doesn't seem to actually get sent to stdout until I send "\n". Is there a way around this?



Relevant system info:

running perl in a dos window



Top
 Profile E-mail  
 
 Post subject: Perl interaction with stdout?
PostPosted: Fri Jun 05, 2009 10:46 am 
Offline
Newbie

Joined: Fri Jun 05, 2009 10:46 am
Posts: 1
This is probably due to output buffering. Put a line like this:
$| = 1;

in your code.

See this:
http://perl.plover.com/FAQs/Buffering.html

for an explanation of what's going on.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Chat Place Privacy
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group   
Design By Poker Bandits