in reply to Truncate string without substr or length
substr and length? substr and rindex!
$s = substr($s, 0, rindex($s, '.')); [download]
The regexp equivalent is
$s =~ s/\.[^.]*$//; [download]