in reply to writing to arrays
I would use an array of arrays like this:
my @data; my $curr; while (<DATA>) { $curr = $1, next if /^>DATA\s+SET\s+(\d+)/; push @{$data[$curr]}, $_; }
use Data::Dumper if you are unsure about the structure of @data.
— Arien
|
|---|