
format picture fields with newlines problem
I am having trouble formatting a multi-line value field
using output record formats. I have read in the Camel that
"only text up to the newline is printed." (page 107).
I would think that the following simple program would have
the expected output that follows.
######## test.pl script follows:
#!/usr/local/bin/perl
format STDOUT =
Label: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$data
~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$data
.
$data = sprintf("1\n2\n3\n4\n5\n6\n");
write;
######## end of script
######## test.pl expected output follows:
Label: 1
2
3
4
5
6
######## end of output
However, the actual output is follows.
######## test.pl actual output follows:
Label: 1 2 3 4 5 6
######## end of output
values. However, the output following the Label: line is
not indented.
Could somebody in the know please point out the errors of
my ways, or at least point me to somebody that knows.
Thanks in advance.
JohnM
_______________________________________________________________________________
John E. Mendenhall Research Systems Engineer
Electronic Data Systems 5400 Legacy Drive Mailstop H4-GF-20 Plano, TX 75024
_______________________________________________________________________________