in reply to split giving me a splitting headache

I'd prefer bart's greedy match. But if you want splitting, then split, pop, rejoin:

use strict; use warnings; my $string = "x.y.z"; my @pieces = split /\./, $string; my $last = pop @pieces; my $first = join ".", @pieces; print "$first $last\n";