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
In reply to Re: writing to arrays
by Arien
in thread writing to arrays
by Superman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |