Thank you all for your responses!! I finally have a handle on it and used a little of
everyones suggestions. This list rocks because of people like you. Thanks again!
Hi Bill,
I know you've had lots of comments on this, but I thought I'd throw my own
style in. Why not do your check at the bottom with a "do until"? First time
round the check is useless anyway, and will give you 'undef' type warnings
with perl -w. It also allows you to be more positive in your co
>Hi all!
>I have this while loop in my script:
>while (($type ne "Windows") || ($type ne "Linux")) {
>print "Enter TYPE of server to build. Linux or Windoze [linux, windows]:\n";
>$type = ;
>chomp $type;
>$type =~ tr/a-z/A-Z/;
>if (($type eq "LINUX") || ($type eq "L")) {
>$type = "Linux"; }
>i
Bill Akins <[EMAIL PROTECTED]> wrote:
:
: while (($type ne "Windows") || ($type ne "Linux")) {
This will always be true. Try:
while ( $type ne 'Windows' && $type ne 'Linux' ) {
^^
HTH,
Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Sorry...
In article <[EMAIL PROTECTED]>, Kevin Pfeiffer wrote:
> In article <[EMAIL PROTECTED]>, Kevin Pfeiffer wrote:
>
>
>> Here's an 'or' version:
>> my $type1 = '';
>> while ( $type1 !~ /wisteria|lime/i ) {
>>print "Enter COLOR of server. Lime or Wisteria [lime, wisteria]: ";
>>chom
In article <[EMAIL PROTECTED]>, Kevin Pfeiffer wrote:
> Here's an 'or' version:
> my $type1 = '';
> while ( $type1 !~ /wisteria|lime/i ) {
>print "Enter COLOR of server. Lime or Wisteria [lime, wisteria]: ";
>chomp( $type1 = ucfirst lc );
>$type1 = 'Wisteria' if $type1 eq 'W';
>$
In article <[EMAIL PROTECTED]>, John W. Krahn wrote:
> 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
> > while (($type ne "Windows") || ($type ne "Linux")) {
> Right here, you must have the full string "Windows" or "Linux"
Yes, correct.
> > print "Enter TYPE of server to build. Linux or Windoze
> > [linux, windows]:
> > \n";
> > $type = ;
> > chomp $type;
> > $type =~ tr/a-z/A-Z/;
>
> Here yo
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 =
> -Original Message-
> From: Bill Akins [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 02, 2003 3:48 PM
> To: [EMAIL PROTECTED]
> Subject: While loop, confused...
>
>
> Hi all!
>
> I have this while loop in my script:
>
> while (($type ne "Windows") || ($type ne "Linux")) {
Right
10 matches
Mail list logo