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...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>DATA SET 1 HSAJDHSDHSADHDSALHDASLDHSALDH HGDKJSHDSADHSALDHLHLDHASDLSAH HKJAHCADHALIDHALSDHLSADHALHDA >DATA SET 2
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
regardsS
Edit: Added <code> tags and some formatting. larsen
Back to
Seekers of Perl Wisdom