On Thu, Dec 13, 2001 at 08:36:03AM -0600, [EMAIL PROTECTED] wrote:
> If you are prepared to change $_:
> 
> if (y/a-zA-Z//>2&&y/0-9//>1) {                # 24 chars for the test
>       print "not valid";
> }

That does not change $_.

> 
> If you can't change $_, you need the c opt on the y's, hence:
> 
> if (y/a-zA-Z//c>2&&y/0-9//c>1) {      # 26 chars for the test
>       print "not valid";
> }

That does not change $_ either; /c complements the search class, so the
first translation counts the occurences of non-letter characters, and the
second translation counts the occurences of non-digit characters.

When the replacement class is empty, and /d is not specified, then the
search class is used as the replacement class as well.

Ronald

Reply via email to