substr( $s, 0, rindex( $s, '.' )); # the part before the dot substr( $s, rindex( $s, '.' ) + 1); # the part after the dot