in reply to How to avoid "Use of uninitialized value" with printf?
Strings sent to STDERR (as from die or warnings) are interspersed with strings sent to STDOUT so errors and normal text may not be shown in the order that they are created. Very often error and warning messages are shown before the normal text that was generated around the time the error occurred.
One way to clean the issue up in this case is:
print join (' ', map {sprintf '%-12s', $_} @rows), "\n";
There are many other ways of course.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to avoid "Use of uninitialized value" with printf?
by bobdabuilda (Beadle) on Apr 11, 2012 at 02:54 UTC | |
by GrandFather (Saint) on Apr 11, 2012 at 05:58 UTC | |
by Anonymous Monk on Apr 11, 2012 at 08:42 UTC | |
by bobdabuilda (Beadle) on Apr 12, 2012 at 06:32 UTC | |
by GrandFather (Saint) on Apr 12, 2012 at 07:43 UTC |