Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 avoiding work at the Monastery: (2)
As of 2018-02-25 22:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (315 votes). Check out past polls.

    Notices?