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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: File Parsing
by GrandFather (Saint) on May 13, 2016 at 06:38 UTC

    Your urgent problem is not my urgent problem. If you did your homework when it was issued you wouldn't be in a panic now!

    Write some code then ask questions about it. The sooner you start the sooner we can help. You won't learn any Perl by getting someone else to do the work for you, but you may get a salient life lesson when you submit the code and ind it sets fire to your computer!

    Premature optimization is the root of all job security
Re: File Parsing
by Laurent_R (Canon) on May 13, 2016 at 06:41 UTC
    Do you expect us to do your homework for you? Do you really think this would be doing you a favor?

    This is a really easy problem. A couple of hours at reading a good tutorial, such as the ones suggested above, should be enough to get you going. Please ask again once you have written the basic code if there is something that still does not work quite right or don't know how to do. We'd be glad to help you at this point.

Re: File Parsing
by Discipulus (Canon) on May 13, 2016 at 07:25 UTC
    As already stated you must show some effort, even for basic questions.

    The data part (peter, john..) it is very easy (profit links given by other monks, search also chomp and split between functions )

    The headers by other hand, are formatted in a very bad way, that make the appropriate parsing difficult, at least to me. To rearrange headers you need to achieve a datastructure like the following:

    [Student][] [science][] [total] [] [Roll_no][] [Cutoff][student] [Name] [] [Mark] [] [mark]
    and then join all columns of the array of array, skipping undef values to have them correctly ordered.

    Better if you can have headers formatted differently or even if you can hardcode them into the program.

    The Perl Cookbook is aged but has tasty recipes about reading from files, if i recall correctly.

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: File Parsing
by Anonymous Monk on May 13, 2016 at 04:12 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: File Parsing
by LanX (Saint) on May 14, 2016 at 21:03 UTC