in reply to Truncate string without substr or length

substr and length? substr and rindex!

$s = substr($s, 0, rindex($s, '.'));

The regexp equivalent is

$s =~ s/\.[^.]*$//;