Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: TK Entry - Validating Input

by Crackers2 (Parson)
on Mar 06, 2013 at 14:49 UTC ( #1022016=note: print w/replies, xml ) Need Help??


in reply to TK Entry - Validating Input

Your regex m/^[0-9a-fA-F]+/ doesn't match the empty string, so when you try to remove the last character your validation fails and the remove is disallowed.

Try return 0 unless( $_[0] =~ m/^[0-9a-fA-F]*/ ) instead.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2022-08-12 02:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?