$string = substr( $string, 0, index($string, '.') ); # or ($string) = $string =~ /^([^.]*)/;