Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: validation of posted data.

by Cine (Friar)
on Jul 31, 2002 at 22:15 UTC ( [id://186623]=note: print w/replies, xml ) Need Help??


in reply to Re: validation of posted data.
in thread validation of posted data.

I've found
if ($display =~ /[^\-a-z0-9\.]/) { #err }
to be easiere to read most of the time.
Also if you _read_ the code, Yours says: unless $display is all good chars make an error. Where this says: If there are any illegal chars make an error. I find the latter easiere to understand.

T I M T O W T D I

Replies are listed 'Best First'.
Now appearing as itself... "."!
by BorgCopyeditor (Friar) on Aug 01, 2002 at 04:27 UTC

    Kind of a tangent, here, but isn't "." acceptable by itself (i.e., unescaped) in a character class, since its function as a metacharacter there wouldn't make much sense?

    BCE
    --Your punctuation skills are insufficient!

      Yes I believe it is, but I find it easiere to see that a literal period is required when it is escaped instead of examining the context and determening it from there.

      T I M T O W T D I

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://186623]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-24 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found