I have a case in my code , where I am asking user to input either Y or N and if they enter something else I want them to re enter , so I have written a while loop such that
print "Do you wish to update (Y/N)?\n"; my $choice = <>; chomp $choice; while ($choice ne "Y" || $choice ne "y" || $choice ne "N" || $choice +ne "n")
but eve if I press Yor N , the flow enters this while loop . so I cant can't understand why ?
In reply to comparison of character by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |