use strict; use warnings; use List::MoreUtils qw(natatime); my $line = '1 AC2 34 TRP A 6 ALA A 7 ILE A 14 GLY A 15'; my @tokens = split /\s+/, $line; my $it = natatime(3, @tokens); while (my @vals = $it->()) { print "@vals\n"; }
In reply to Re: Split at specific spaces
by toolic
in thread Split at specific spaces
by perl_search_m
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |