my $pos = rindex( $string, '.' ); my $result = ($pos >= 0 ? substr( $string, $pos+1 ) : '' );