The first part is easy, use index. The length requirement means an additional test:
my $pos = index $str, '*'; $pos = length $str if $pos < 0;
In reply to Re: Finding location
by GrandFather
in thread Finding location
by uvnew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |