in reply to split...or better?
perl -le '$x = "foo.bar.aaa"; print substr $x, 0, index $x, "."' [download]