|Pathologically Eclectic Rubbish Lister|
Character class questionby bluethundr (Pilgrim)
|on Apr 25, 2004 at 20:29 UTC||Need Help??|
bluethundr has asked for the
wisdom of the Perl Monks concerning the following question:
New to perl, new to perlmonks. But this time I am motivated enough to believe that I'll finally get a handle on the beast! Dare I say I _love_ learning regular expressions?
Okay before I get too verbose, I should say that I believe (not sure) I'm using 5.6.1. (tried manning to find perl version, but no luck - also checked perlfaq). The book I am learning from is Laura Lemay's "Perl In 21 Days" by sams. The code example is one I entered by hand from the book and it can be found in the "Day 9" lesson.
I have stared at this code 'till my eyes started bleeding and I think I need a fresh pair (hopefully those of a perlmonk) to help me figure this one out.The code that's troubling me in specific is this:
Which should print out the annoying message in the print command. It does not. I know not why. Otherwise, it compiles and works "fine". I could whine about the things I tried, but I'm trying (unsuccessfully) to keep this short.The script is as follows:
All of the other options in the while loop that tests the input (using regexes) after the "nonnumbers" test:
janitored by ybiC: Retitle from less-than-descriptive "5.6.1 begginner newb question", balanced <readmore> tags around codeblock, minor format tweaks for legibility