in reply to Re^2: Control Structure problem, mistake can't be found
in thread Control Structure problem, mistake can't be found

qw> is the "quote words" operator. It lets you do nifty stuff like:

my @foo = qw( key west florida orange juice beverage ); # this is identical to: my @foo1 = ( 'key', 'west', 'florida', 'orange', 'juice', 'beverage', );

See perlop, specifically, the section on Quote and Quote-like Operators" for more info.

You should consider using push instead of recopying the array:

# @incorrect = (@incorrect, $guess); push @incorrect, $guess;

When I was first learning, the single most useful piece of the documentation was the list of functions by category in perlfunc--although I used the version in my copy of Perl in a Nutshell. Anytime I felt like I was doing something awkward or that there might be a better way to do something, I'd look for a built in function to accomplish it.

Useless little toy programs are an excellent way to start. At the beginning of a big project I'll usually build several useless, little toy programs to test my ideas--only I've learned to call the toys "prototypes", because that sounds better. As a beginner, you are building the prototypes for ALL your future programs.


TGI says moo