Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks, I'm using perl format to print variable field data fields having new lines
#!/usr/bin/env perl use warnings; my $f = "format = \n" . ('^*' . '|') x 3 . "~~\n" . '@row' . "\n" . ".\n"; eval($f); my $f = "format = \n" . ('^*' . '|') x 3 . "~~\n" . '@row' . "\n" . ".\n"; eval($f); print $f, "\n"; my @row = ('line1 line3 ', 'line4 line5 line6 line7 ', 'line8' ); write; exit
but this gives me weird results, when I reduce num cols to 2 then it works as per documentation. Need your help in getting this code work.
exit
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perlform ^* variable field length
by pme (Monsignor) on Apr 27, 2015 at 15:38 UTC | |
by Anonymous Monk on Apr 27, 2015 at 15:54 UTC | |
by pme (Monsignor) on Apr 27, 2015 at 19:42 UTC | |
by Anonymous Monk on Apr 28, 2015 at 07:28 UTC | |
by Not_a_Number (Prior) on Apr 28, 2015 at 08:01 UTC | |
| |
by pme (Monsignor) on Apr 28, 2015 at 08:37 UTC | |
| |
|
Re: perlform ^* variable field length
by Anonymous Monk on Apr 28, 2015 at 10:28 UTC |