Please consider using a regular expression to perform the validation as it is much simpler to code and faster to execute:
use feature ":5.14"; use warnings FATAL => qw(all); use strict; use Data::Dump qw(dump); say (/\Aa*\Z/ ? "$_ is all a's" : "$_ is not all a's") for qw(aaaa aaa +ab aaac cccccbbb cccca);
Produces:
aaaa is all a's aaaab is not all a's aaac is not all a's cccccbbb is not all a's cccca is not all a's
In reply to Re: my script is not giving the result using last function
by philiprbrenan
in thread my script is not giving the result using last function
by ulaksh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |