in reply to Re^2: Syntax error - "my" within foreach loop
in thread Syntax error - "my" within foreach loop

True, but better for the student to learn the importance of prompting the user clearly, and explicitly... AND to learn first to code using explicit constructs, rather than relying on implicit (and OS-dependant) ones.

For example, lusers could still screw this up, but at least the program's author would have tried:

... print "Type a series of words, separated by spaces, ending with a retu +rn:\n"; my $words = <STDIN>; chomp $words; my @words = split (/ /, $words); ...