You seem to be highly confused about variables.
$words and @words are two different variables in Perl. You are using $words[0], which accesses the variable @words. Maybe you want to read and learn perlvar and the syntax of variable names.
In reply to Re^5: While problem
by Corion
in thread While problem
by pabla23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |