bobdabuilda has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Assistance fixing a "format" call
by Marshall (Canon) on Apr 02, 2012 at 02:51 UTC | |
by bobdabuilda (Beadle) on Apr 02, 2012 at 03:18 UTC | |
by Marshall (Canon) on Apr 02, 2012 at 03:23 UTC | |
|
Re: Assistance fixing a "format" call
by Anonymous Monk on Apr 02, 2012 at 05:30 UTC | |
by bobdabuilda (Beadle) on Apr 02, 2012 at 06:16 UTC | |
by Marshall (Canon) on Apr 02, 2012 at 17:30 UTC | |
by bobdabuilda (Beadle) on Apr 02, 2012 at 23:09 UTC | |
by Marshall (Canon) on Apr 04, 2012 at 03:47 UTC |