substr and length? substr and rindex!
$s = substr($s, 0, rindex($s, '.'));
The regexp equivalent is
$s =~ s/\.[^.]*$//;
In reply to Re: Truncate string without substr or length
by ikegami
in thread Truncate string without substr or length
by spivey49
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |