Anyway, I didn't want to be too harsh.
Just had to laugh about my imagination.

But I'm sure you can and should try your task on your own.
To be honest it's quite basic.
And I'd like to propose Perl was originally intended for this sort of tasks,
working with text files (config and log files).
So your homework is quite senseful.

I'm also sure if you try and run into any troubles, you will get any help you need here on this forum.

Hopefully you'll be successfull. To see a script doing what you want can also be fun and a nice affirmation.

Good Luck..


...addition:
I'd like to give you the hint that your prof will most likey test the script with other files.
If your script gives you the desired output you posted,
this doesn't mean it works in all cases.


In reply to Re^3: Content of one file to another file if a filed matches by misc
in thread Content of one file to another file if a filed matches by sm81

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.