http://www.perlmonks.org?node_id=357679

bluethundr has asked for the wisdom of the Perl Monks concerning the following question:

Hey guys, It's been a little while since I've been back to the gates, because I have decided to have a "fresh start" with the Llama. This after a pusillanimous start in my path to true perl wisdom.

Now, I know that some folks out there aren't happy that I haven't yet learned the use of 'strict'. To whit I say "PATIENCE my brethren!" ;P. For I realize that I've only ridden tricycles my whole life. Now I've taken it upon myself to learn how to drive a fricken' Batmobile and I'm only up to 3rd gear...out of 27 or so! It'll be some time before I get to ejector seats n' oilslicks! As soon as doc merlyn 'splain to me 'bout strict in da book, I promise to you I will start using it! :D

At any rate, I've been cruisin' right along through the examples up to this point! But I have inadvertantly rammed the Bat'bile into a wall at the moment. For the past two hours I've been frying my brain with variations on Chapter 3 example 2.
#!/usr/bin/perl -w @names = qw/fred barney wilma betty/; @in; $count = 0; print "\n\n\n"; # just some dumb formatting while ($in[$count] !~ /q/i) { print "\nPlease enter a number: "; chomp($in[$count]); count++; } foreach $x (@in) { print $names[$x]; print "\n"; } print "\n\n\ndone.\n\n\n"; # just more formatting and so I know it's + "done"


The error I get (consistantly) is

Use of unitialized value in pattern match (m//) at ./chp3-ex2.pl in line 11, <STDIN> line 2.

I swear to you that I've been tinkering with this for HOURS!!!! I suppose, no I know I've learned some stuff from the tinkering! That's what I've been doing with EVERY example from the book. Tinkering, experimenting, playing. I've pretty much been ignoring the "time suggestions". Usually I'm way under even those suggestions! But for now, I sit here...befuddled. I think I am going to have a little break and go take in some bad sci-fi!

By the way, for those of you who gave me SAGE advice on my last go round through Perl 21 (which I abandoned halfway through)...your words are *NOT* lost on me! EVERY POST has been read, re-read and will be re-read AGAIN after I have a better grasp of the llama!