To test if a variable contains a repeat sequence of some letter, any one letter:
if ($myvar =~ /^([[:alpha:]])\1*\z/) { ... }
In reply to Re: Check if a variable contains only one letter?
by oiskuu
in thread Check if a variable contains only one letter?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |