Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Silly While Loop Problems

by Anonymous Monk
on Sep 30, 2011 at 17:52 UTC ( [id://928879]=note: print w/replies, xml ) Need Help??


in reply to Re: Silly While Loop Problems
in thread Silly While Loop Problems

Thanks guys but chomp didn't solve my problem, the strange thing is that if i put a print "$yn"; in the loop it prints the input just fine.

Do you wish to continue the installation (Y/N) : y y Invalid option, please enter an Y or N : n n Invalid option, please enter an Y or N : Y Y Invalid option, please enter an Y or N : N N Invalid option, please enter an Y or N :

Replies are listed 'Best First'.
Re^3: Silly While Loop Problems
by SuicideJunkie (Vicar) on Sep 30, 2011 at 18:20 UTC

    Don't do print "$yn";.

    Do print "##$yn##\n"; or similar instead. That lets you see whitespace characters

Re^3: Silly While Loop Problems
by ikegami (Patriarch) on Oct 01, 2011 at 00:30 UTC

    If you did chomp, it would look like

    Do you wish to continue the installation (Y/N) : y yInvalid option, please enter an Y or N : n nInvalid option, please enter an Y or N : Y YInvalid option, please enter an Y or N : N NInvalid option, please enter an Y or N :

    You've actually proved blue_cowdawg found one of the problems.

Re^3: Silly While Loop Problems
by ikegami (Patriarch) on Oct 01, 2011 at 00:31 UTC

    If you did chomp, it would look like

    Do you wish to continue the installation (Y/N) : y yInvalid option, please enter an Y or N : n nInvalid option, please enter an Y or N : Y YInvalid option, please enter an Y or N : N NInvalid option, please enter an Y or N :

    You've actually proved blue_cowdawg found one of the problems.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://928879]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-26 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found