rynorx has asked for the wisdom of the Perl Monks concerning the following question:
Hello everyone, I've just recently started using Perl and am having trouble with my first program:
#!/usr/bin/perl print "Press C to continue\n"; $getc = <STDIN>; while ($getc ne 'c') {print "getc is $getc"; $getc = <STDIN>;} print "It worked, finally";
No matter what input I give for $getc, I'm not able to get past the while loop. Thanks in advance for any help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Proper use of "EQ" or while loops
by MidLifeXis (Monsignor) on Jul 22, 2013 at 15:01 UTC | |
by rynorx (Novice) on Jul 22, 2013 at 15:30 UTC | |
|
Re: Proper use of "EQ" or while loops
by davido (Cardinal) on Jul 22, 2013 at 15:30 UTC | |
|
Re: Proper use of "EQ" or while loops
by toolic (Bishop) on Jul 22, 2013 at 15:12 UTC | |
|
Re: Proper use of "EQ" or while loops
by cursion (Pilgrim) on Jul 22, 2013 at 15:35 UTC |