in reply to writing to arrays
Something like that; I may have typos and such. How this works is that if a >DATA SET xxx line is seen, then $array is set to point to the proper array. Otherwise, a line is added to the current array.my @array_set; my $array; while (<DATA>) { if (/^>DATA SET (\d+)) { $array= \$array_set[$1]; } else { push @$array, $_; } }
|
|---|