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, $_; } }
In reply to Re: writing to arrays
by John M. Dlugosz
in thread writing to arrays
by Superman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |