Hi!
This should do what you need:
use strict; my $ident="aaa bbb ccc-ddd eee fff-ggg hhh iii-jjj kkk lll-"; my @id = split /-|\s/, $ident; foreach my $i(0..$#id) { print $id[$i]; if ((($i+1) % 3) == 0) { print "\n"; } else { print ' '; } }
Michele.
In reply to Re: Re: Re: spliting arrays
by arthas
in thread spliting arrays
by bory
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |