use strict; my $lineshapesline1 = 'SHAPES GREEN1;SIZE 240 500 340 930;SIZE 350 500 + 240 590;SIZE 295 390 015 490;SIZE 350 210 760 300;SHAPES GREEN2;SIZE + 450 310 680 690;SIZE 450 110 680 490;SIZE 215 800 560 900;'; my @array; while ( $lineshapesline1 =~ /(SHAPES.*?)(?=SHAPES|$)/g ) { push @array, $1; } print "$_\n" for @array; __END__ SHAPES GREEN1;SIZE 240 500 340 930;SIZE 350 500 240 590;SIZE 295 390 0 +15 490;SIZE 350 210 760 300; SHAPES GREEN2;SIZE 450 310 680 690;SIZE 450 110 680 490;SIZE 215 800 5 +60 900;
In reply to Re: splitting line without split
by keszler
in thread splitting line without split
by garbage777
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |