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.