Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: easy newbie question

by repson (Chaplain)
on Apr 24, 2001 at 09:46 UTC ( #74967=note: print w/ replies, xml ) Need Help??


in reply to easy newbie question

The only time you should use "\r" is when you specifically require a carrige return without a new line, like in this.

for (1..10) { print "\r$_"; sleep 1; }

That code counts from one to two once per second reusing the same line. This can be useful for a progress counter or other ticker you need to update.

In almost all other cases a "\n" is the normal way for new lines, except in network communication where you should generally use "\015\012" or something similar.


Comment on Re: easy newbie question
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (14)
As of 2015-07-08 05:16 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 (94 votes), past polls