It sounds like you already have a good solution, but for me, the obvious one is to pop the output from split into an array, then take the first and last values.
my @array = split(/\s+/, $_);
my ( $key, $value ) = @array[ 0, -1 ];
That approach doesn't care if the number of values changes -- you always get the first and the last values. Also, the split could be simplified to just
my @array = split(/\s+/);
because
$_ is the default parameter for this function.
Alex / talexb / Toronto
Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.