Can someone show me some head-ups on how to generate an output like this?
#!/usr/bin/perl use strict; use warnings; print <<'__xxx__'; Item Availability Broken Newly_order Total_Stock Laptop_Monitor 10 2 15 (10-2+15) Laptop_Bag 25 1 20 (25-1+20) Office_Chair 20 1 10 (20-1+10) __xxx__

Or did you want to generate that output from any input?

Perlmonks is no code writing service. Show your code, then we'll help you improve it.

I am new to Perl and this is the first assignment that I get.

Well, start with perlintro and the notes you made before the assignment.

How would you solve this problem in another language, like C or Java? Write that down, then convert it to Perl.

If you are new to programming, imagine you had an incredible stupid, but diligent assistent. How would you explain the job to him, in baby steps and simple language? ("Open the first file. Read a line from the first file. ...") From there, translating to Perl, C, Java or most other computer languages is quite easy.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re: How to combine these two files? by afoken
in thread How to combine these two files? by chaney123

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.