in reply to Re: split with a delimiter, every 4 time it occurs.
in thread split with a delimiter, every 4 time it occurs.
Yes,
Actually I tried the same solution by modifying it but it is not working! I am not good in Perl. Can you pls suggest me a way out.
Here is my code,
my $to_split = 'A','B','C','D','E','F','G','H','I','J','K','L','M','N' +,'O','P','Q','R','S','T','U','V','W','X','Y','Z'; my @ra = split m{ (?: \',\' [^\',\']+){50} \K \',\' }xms, $to_split ; + foreach my $piece(@ra){ print "\n\n" . $piece . "\n\n"; }
Can you pls suggest me where I got wrong?
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: split with a delimiter, every 4 time it occurs.
by ww (Archbishop) on Jul 01, 2013 at 14:12 UTC |