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.
|
---|
In Section
Seekers of Perl Wisdom