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