Just another Perl shrine | |
PerlMonks |
Re: TK Entry - Validating Inputby Crackers2 (Parson) |
on Mar 06, 2013 at 14:49 UTC ( [id://1022016]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|