Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Error when using system("clear") command

by regexes (Hermit)
on Jul 17, 2007 at 12:05 UTC ( [id://627009]=note: print w/replies, xml ) Need Help??


in reply to Error when using system("clear") command

Hello,

On the presumption that your clear command is trying to clear the screen.
In this portion of the code..
if($version eq "XP") { system("wmdist -e $input SUCCESS > XP_success.txt"); system("clear"); system("wmdist -e $input FAILED > XP_failed.txt"); $|=1; system("wmdist -e $input WAITING > XP_waiting.txt"); }
The command is incorrect?

I believe it should be
system("cls");
At least when I run cls on an XP machine, it clears the screen.

regexes


-------------------------
Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan "press on" has solved and always will solve the problems of the human race.
-- Calvin Coolidge, 30th President of the USA.

Replies are listed 'Best First'.
Re^2: Error when using system("clear") command
by Anonymous Monk on Jul 14, 2009 at 18:45 UTC
    int Clear() { //clears and sets the cursor to home position std::cout << "\x1B[2J"; std::cout << "\x1B[0;0H"; }
    this is the appropriate method for both *nix and win. Using the system("clear") | system("cls") is not a safe practice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-19 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found