http://qs1969.pair.com?node_id=1193295


in reply to Pattern match and splitting of that

split is an appropriate tool for this job:
use strict; use warnings; use Data::Dumper; my $string = "RABBIT 45 -126.06686"; my @parts = split /\s+/, $string; print Dumper(\@parts); __END__ $VAR1 = [ 'RABBIT', '45', '-126.06686' ];

Also, the code you posted has a compile error.