Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Checking for single digit

by Abigail-II (Bishop)
on May 06, 2003 at 07:46 UTC ( #255818=note: print w/replies, xml ) Need Help??


in reply to •Re: Re: •Re: Checking for single digit
in thread Checking for single digit

Actually, considering chomping was not done, the original answer, /^\d$/ would be correct, unlike your answer, which would never match, as there would always be the trailing newline.

The fact that $ can match just before a trailing newline makes cases like this "do what I mean".

Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://255818]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2018-05-24 23:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?