-----------------UPDATE---------------
I ended up using printf in the following manner, thanks for your replies:
Note: the -10 indicates to align-left and with 10 places.
foreach (@unseen) { printf ("%-10s\t\t%-10s\n",$seen[$i],$unseen[$i]); $i--; }
---------------------------UPDATE ABOVE-----------------
I'm trying to have the output neatly in two columns but for some reason I am doing something wrong, because when there are no more files on the left side, the formatting screws up!
print "Email folder: $EMAIL_FLDR\n"; print "Spam:\t\tHam:\n"; foreach (@unseen) { print "$seen[$i]\t\t$unseen[$i]\n"; $i--; }
Small snippet of output: (notice the last two files)
Spam: Ham: ./50257_S ./36967_X ./27649_S ./mailtest.pl~ ./32894_S ./mailtest.pl ./71114_S ./rules ./54615_S ./22096_X ./41237_S ./56628_X ./1902_S ./2780_X ./50257_S ./87952_X ./90737_X ./51698_X

In reply to Am i formatting correctly? by dark314

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.