Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: overwritting print in same line

by tweetiepooh (Friar)
on Nov 14, 2011 at 16:35 UTC ( #937982=note: print w/ replies, xml ) Need Help??


in reply to overwritting print in same line

If you just want to add dots then combine switching off buffering output with not printing "\n"

$|=1; [some loop condition] print "."; [do other stuff] [end loop]
This will print dots next to each other which maybe close to what you are asking for.
Depending on what you are doing you may only want to print a dot every n iterations
$|=1; $counter=0; [some loop condition] print "." unless $count++ % n; [do other stuff] [end loop]


Comment on Re: overwritting print in same line
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://937982]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2015-07-04 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls