Hi guys, earlier I posted a question asking how to go about formatting output to screen into columns. Got an excellent couple of responses to my question, which I've been playing with.

Unfortunately, I am having issues with one of the instances of use of this in my script... and can't for the life of me work out why this is so.

Now - the one below, is working fine :

while (@list) { my @row = splice(@list, 0, 4); format STDOUT = @<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<< +<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<< @row . write; }

But the next one, for some reason, just prints blank space...

while (@UACS) { my @rows = splice(@UACS, 0, 5); print "@rows"; format STDOUT = @<<<<<<<<<<<< @<<<<<<<<<<<< @<<<<<<<<<<<< @<<<<<<<<<<<< @<<<<< +<<<<<<< @rows . write; }

To confirm things *should* be ok from an input perspective, I threw in the print "@rows"; line to see what was being passed to STDOUT - and it appears as it should - see an example of two of the resulting lines below:

TECH SCANNER WEBSERVER TALKTOME TRAINING TESTING MOBILE TECHADMIN CIRCADMIN MANAGERS

So... to me the input seems ok, the command seems the same as the one which is working - aside from a slight change in the formatting itself. Any suggestions on where it is I'm going wrong with this?


In reply to Assistance fixing a "format" call by bobdabuilda

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.