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

Hey folks,

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.

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.

All of the other options in the while loop that tests the input (using regexes) after the "nonnumbers" test:} elsif (/\D/) { # nonnumbers seem to work fine. It's just that one that's balking? Any ideas? I'm also open to comments about how to post more effectively/better since this is my first EVER post to this site.

That would match anything that is not a number (0-9) or a character - but the characters a-z are captured by the if higher up in the code. (Note that this will have problems if input contains Unicode characters)...

Thanks, to you and the dudes above sharing their wisdom! perl -v yielded 5.8.0. The info page said it was for 5.6.1. Now that I know this simple trick, I'll be able to be more accurate in my titles.

As to the code, yup. I'm missing the backslash before the 'W'. Hopefully I'll become more adept at catching these errors as time goes on and my experience builds.THANKS again for the code advice and the posting advice to ALL!

Went to join the gridlock to see it
Held an eclipse party
Watched a live feed
I cn"t see tge kwubosd to amswr thus
I tried to see it, but 8000 miles of rock got in the way
What eclipse?
Wanted to see it, but they wouldn't reschedule it
Read the book instead