http://www.perlmonks.org?node_id=222231

Superman has asked for the wisdom of the Perl Monks concerning the following question:

hi monks...

i have a plain text file that looks something like...
>DATA SET 1 HSAJDHSDHSADHDSALHDASLDHSALDH HGDKJSHDSADHSALDHLHLDHASDLSAH HKJAHCADHALIDHALSDHLSADHALHDA >DATA SET 2
and what i want to get done is to take each set of data by reading the lines as a string and pushing them into separate arrays

so what i have is something like

if ($string =~ /^\>/){ next unless $string =~/^\>/; push @array, $string; }

does this look sensible? will this actually do what i want it to? i want my 1st array to contain data set 1 and so forth...

please help as i have a deadline for the new year

regards
S

Edit: Added <code> tags and some formatting. larsen