Say, I have this data in a file:
start
1
5
6
start
4
5
start
6
end
I want this data to be stored in array of arrays like
([1,5,6],[4,5],[6])
I tried it with flip flop operator:
if(/start/../start/){
my $line=<DATA>;
print "$line \n";
push(@data,$line) if($line=~/start/);
}
}
It didn't worked for me. Any suggestions and help is greatly appreciated.