in reply to Splitting on tabs then removing extra white space with map
#!/usr/bin/perl use warnings; use strict; use Data::Dump qw(pp); while(<DATA>){ s/^\s+//; chomp; my @points = split(/\s+/, $_, 6); print "\n\@points =\n", pp \@points; #More code here } __DATA__ 0.000 12 0.232 13 11 text that c +an have space 1.000 13 0.534 14 12 More text t +hat would be ok 2.000 14 0.876 15 13 yet more te +xt
|
---|