my $alphabetised = "1"; # Sets $alphabetised to "1" until ($alphabetised = "1"){ # Sets it to "1" again # Succeeds (returns TRUE) # TRUE before we even begin # Thus, never executed };
Alternatives (pick one):
until ($alphabetised == "1"){ # Checks instead of sets until ($alphabetised eq "1"){ # Checks instead of sets while ($alphabetised eq "1"){ # while() instead of until() my $alphabetised = "0"; # Initialize differently
In reply to Re: Why doesn't this code run?
by dbander
in thread Why doesn't this code run?
by WizardOfPerl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |