the program loops endlessly. What am I doing wrong? Thanks in advance$query = "bush and clinton and bush and obama and huckabee"; @searchTexts = split (/and|or/i,$query); for ($i = 0; $i <= @searchTexts +1 -1; $i++) { @searchTexts[$i] =~ s/^\s+//; @searchTexts[$i] =~ s/\s+$//; print @searchTexts[$i]."\n"; }
In reply to Huge simple problem by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |