in reply to split...or better?

Well... you can do
my $val = (split /\./, 'foo.bar.aaa')[0]; #or my($val) = 'foo.bar.aaa' =~ /^([^.]+)/;
The regexp method is most likely the more efficient, especially on larger strings.

                - Ant
                - Some of my best work - (1 2 3)