while ( ) { s/\A\s+//; # Remove leading and s/\s+\z//; # trailing whitespace my @points = split /\s*\t\s*/; # split on tabs and surrounding whitespace print "\n\@points =\n", pp \@points; #More code here }