Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I get warnings if I use -w. Unfortunately, I know little about formatted output, but do try this one:
Output with Perl 5.8.8:
My guess is that write wants to print one more line than there are data elements for. In your first example, this happens four times, because after the row
the array contains only two elements. write tries to shift three, and you get your first "uninitialized value" warning. Then write tries to print one line more, but the array is exhausted of elements, and you get thus three more warnings. In my shorter example, there is only one warning, because each line contains only one shift. I have no clue whether this is a bug or a feature. I can remember using formatted output only once in my life, and that was years ago.
-- In reply to Re: Use of uninitialized value in formline?
by vrk
|
|