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
In Section
Seekers of Perl Wisdom