It'd probably be best to split using the magical ' '.
my $string = " a b c "; # note leading/trailing whitespaces
my @array1 = split /\s+/, $string; # returns '', 'a', 'b', 'c' (4 item
+s)
my @array2 = split ' ', $string; # returns 'a', 'b', 'c' (3 item
+s)
|