Subject: | Error in 'clear console' logic for MSWin32? |
The logic to clear the screen before showing a menu starts at line 937.
If using a normal Win32 console, the 'elsif' clause should be selected,
but it since $clear is nonzero, execution never follows this path.
if ($OS ne 'cygwin') {
if ($clear) {
print $clear;
} elsif ($OS eq 'MSWin32') {
system("cmd /c cls");
print "\n";
} else {
print `clear`."\n";
}
}
In MSWin32, this results in the text:
'clear' is not recognized as an inteoperable program or batch file.
being printed to the console.
I changed my local file to:
if ($OS ne 'cygwin') {
if ($OS eq 'MSWin32') {
system("cmd /c cls");
print "\n";
} else {
print `clear`."\n";
}
}
which works ok on Win32, though I have not tried it on other *nix installs.