Hi;

how do make certain that no input (keyboard + mouse paste) is outside
of 7-bit ASCII in a perl script?

Since I have no intention of correctly or completely handling input
that is outside of 7-bit ASCII, I thought it would be best to prevent
any characters outside of 7-bit ASCII from being input.

How best to do this?

I want to keep it simple.

Are there specific pragmas and/or modules that I can use to force this?

I'm looking at Programming Perl (3rd Edition), Perl Cookbook (2nd
Edition), cpan.org, etc, and I'm finding lots of stuff but it is
either too much (need some guidance) or not quite what I'm looking for
(confusing).

Let's say that I have only two kinds of prompted input:Yes/No question
and one numeric capturing regex.

If I compare the first letter of the response being either "Y" or "y"
then I can assume that any other response was a negative, even if it
was a 16-bit Unicode character?

Secondly, if I literally compare against digits and whitespace in my
capturing numeric regex, then anything outside of that I can
categorically reject?

Looking for the fishing pole more than the fish.

Thanks,
Ken Wolcott

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to