spudnic has asked for the wisdom of the Perl Monks concerning the following question:
Greetings,
I'm having a problem using formats. The issue arises when the variable that is to be printed last in a line contains only spaces nothing is added to the end of the line. This variable on most rows will be something other than all spaces or it wouldn't be a problem. I must have these spaces as they are required for the parser to find something in those columns.
Example:
The parser freaks out if there is anything after where I need the spaces, so I can't force padding by sticking something in the next field.
Any suggestions? The parser is an old mainframe job, so getting it modified would be a big pain.
Thanks
I'm having a problem using formats. The issue arises when the variable that is to be printed last in a line contains only spaces nothing is added to the end of the line. This variable on most rows will be something other than all spaces or it wouldn't be a problem. I must have these spaces as they are required for the parser to find something in those columns.
Example:
When you run#!/usr/bin/perl # This script is called format_test format = @<<<<@>>> $field1,$field2 . $field1 = "Hello"; $field2 = " "; write;
you get 6../format_test | wc -m
The parser freaks out if there is anything after where I need the spaces, so I can't force padding by sticking something in the next field.
Any suggestions? The parser is an old mainframe job, so getting it modified would be a big pain.
Thanks
Back to
Seekers of Perl Wisdom