> -----Original Message----- > From: Randy W. Sims [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 24 February 2004 3:21 AM > To: daniel > Cc: [EMAIL PROTECTED] > Subject: Re: \r -Option > > On 02/23/04 10:41, daniel wrote: > > Hi Guys, > > > > I'm running the following code under w2k command-line: > > > > $| = 1; #Autoflush > > print "Test\r"; > > sleep 2; > > print "OK"; > > > > and the output is > > > > OKst > > > > Eh, how can I delete the whole privious print output ???? > > As you noticed the \r returns the "cursor" to the beginning of the > current line; it does not affect the contents of that line. >
The Term::Cap module allows you to output 'escape codes' to the screen which do things like clear the line, clear the screen, position the cursor etc.. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>