BioBoy has asked for the wisdom of the Perl Monks concerning the following question:
Even if either 'g' or 'l' are entered, the code always gets trapped in the loop. Confused...# - ask the user whether or not they would like to align their sequenc +es Locally or Globally print $username . ", would like to align your protein sequences gl +obally or locally? (enter either 'g' or 'l') "; $alignment_type = <STDIN>; # - debug print "\n", $alignment_type, "\n"; # - debug while( ($alignment_type ne 'g') or ($alignment_type ne 'l') ){ print $username . ", your selection was incomprehensible (ente +r either 'globally' or 'locally'): "; $alignment_type = <STDIN>; } print "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Basic 'while' loop problem
by davido (Cardinal) on Oct 04, 2005 at 06:45 UTC | |
|
Re: Basic 'while' loop problem
by muntfish (Chaplain) on Oct 04, 2005 at 11:15 UTC | |
by BioBoy (Novice) on Oct 04, 2005 at 15:58 UTC | |
|
Re: Basic 'while' loop problem
by tirwhan (Abbot) on Oct 04, 2005 at 09:55 UTC | |
|
Re: Basic 'while' loop problem
by PodMaster (Abbot) on Oct 04, 2005 at 06:46 UTC | |
|
Re: Basic 'while' loop problem
by husker (Chaplain) on Oct 04, 2005 at 14:24 UTC | |
| |
|
Re: Basic 'while' loop problem
by Anonymous Monk on Oct 04, 2005 at 07:21 UTC |