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.