Bill Akins wrote:
> 
> Hi all!

Hello,

> I have this while loop in my script:
> 
> while (($type ne "Windows") || ($type ne "Linux")) {

Your problem is that you are using or when you should be using and.


> print "Enter TYPE of server to build. Linux or Windoze [linux, windows]:
> \n";
> $type = <STDIN>;
> chomp $type;
> $type =~ tr/a-z/A-Z/;
> if (($type eq "LINUX") || ($type eq "L")) {
> $type = "Linux"; }
> if (($type eq "WINDOWS") || ($type eq "W")) {
> $type = "Windows"; }
> }

while ( $type ne 'Windows' and $type ne 'Linux' ) {
    print "Enter TYPE of server to build. Linux or Windoze [linux,
windows]:\n";
    chomp( $type = ucfirst lc <STDIN> );
    $type = 'Windows' if $type eq 'W';
    $type = 'Linux'   if $type eq 'L';
    }


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to