Anonymous Monk 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: Matrix
by Skeeve (Parson) on Feb 29, 2004 at 00:03 UTC
    You won't get your homework solved here.

    Your previous post was deleted because we don't like people to think this is a place where you get your tasks solved for free.

    If you want us to help you, show us what you already programmed and where you have difficulties. Then we might help you.
Re: Matrix
by AcidHawk (Vicar) on Feb 29, 2004 at 09:36 UTC

    There have been many comments on this being a homework assignment so I'll post no code. However, as I looked at the problem I realised that nothing jumped out at me as to how I would solve this problem so I'll just put down some of my thinking and let any other monks comment.

  • Open the file
  • Read in line by line seperating each line by a space making the 1st element of the line the key of a hash. The second and third element of the line would then become $matrix{key} = [meal, TimeOfDay]
  • Print a line of the headings I.e. Food Morning Noon Night
  • Process each key in the hash checking the second element of the value array in the hash for where you position the "type of meal". - What module could be used for the formatting of the output table..?
  • Close the input file
  • Does that make any sense..? Is there a better way to tackle this problem..?

    Of all the things I've lost in my life, its my mind I miss the most.
Re: Matrix
by flyingmoose (Priest) on Feb 29, 2004 at 03:29 UTC
    For what it's worth, I was the one who asked that your first attempt to post this question be deleted. It's incoherent, you show no effort of your own, and you are trying to cheat on your school work. Well, that's three things I don't like, and I'm glad someone finally approved your question so that you can understand why no one on this board will answer it -- and so you won't continue to post the same question or look to PerlMonks as a source of freebies.

    For starters, learn learn how to ask questions. I'll forgive the Engrish for now. But it helps to attempt to speak the native tongue of the forum as well. And, of course, do some work of your own!

Re: Matrix
by Anonymous Monk on Feb 29, 2004 at 00:20 UTC
    Sir , Why don't you just post the your code and then we can guide you? We can't just write the code for you !!! . This place is to learn and advance not to get away with a homework. I am willing to help you solve this issue if you show me how far you got on your code. Thanks