in reply to splitting line without split

I don't understand why you don't like split, but maybe a regex will be more to your liking?
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;