Hi Brandon, On Fri, 16 Sep 2011 11:32:16 -0400 Brandon McCaig <bamcc...@gmail.com> wrote:
> On Thu, Sep 15, 2011 at 3:48 PM, Rob <rdavis7...@gmail.com> wrote: > > I have a file of test results it is formatted as follows: > > > > School |fname| lname | sub| testnum|score| grade|level > > MLK School | John | Smith | RE | Test 1| 95| A | Prof > > MLK School | John | Smith | RE | Test 2| 97| A | Prof > > MLK School | John | Smith | RE | Test 3| 93| A | Prof > > MLK School | John | Smith | RE | Test 4| 89| B | NP > > > > What I would like to come out with is as follows: > > > > SCHOOL |fname| lname | sub| > > testnum|score| grade|level > > MLK School |John|Smith|RE|Test 1| 95| A | Prof| Test 2| 97|A|Prof| > > Test 3|93|A|Prof|Test4|89|B|NP > > There are a number of CSV modules available on CPAN. I've only > ever used Text::CSV::Slurp and the file was the standard (?) > quoted-columns-comma-separated format. Regardless, if necessary, > you should be able to configure your module of choice to parse > whichever delimiters that you need. > > To critique your code: > > You should begin all programs with: > > use strict; > use warnings; I'd like to thank you for your detailed response. I saw the original code and found it an overwhelming task at that point to reply to the original poster, and so I didn't. Thanks for saving me a lot of work. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ My Favourite FOSS - http://www.shlomifish.org/open-source/favourite/ Larry Wall is lazy, impatient and full of hubris. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/