gnu@perl has asked for the wisdom of the Perl Monks concerning the following question:
My solution was to ad a '@' in the beginning of the line with a empty variable correlating to it. This does get my text that I want to display to indent but I don't like the idea of having to include an empty value just to do it.
I know I must be missing something.
Also, I realize the code here is terriable looking, I just threw it together as an example.
TIA, Chad.
As it is written above I get(the format I want):my ($Company, $Department, $DeptCode, $Address, $Page, $Address2, $Pho +neNumber, $NumPieces, $DatRcvd, $Month, $Day, $Year, $SubmittedBy) = +('US LEC','','','8210 University Exec Park Dr.','1 of 4','','704.319. +6297','20','','10','07','2002','Chad Johnson'); my $NULL = ''; format STDOUT = @<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $NULL, $Company @<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<@<<<<<<<<<<< +<<<<<<<<<<< $NULL, $Department, $DeptCode @<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $NULL, $Address, @<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +<<<<<<<<<<< $Page, $Address2 @<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<@<<<<<<<<<<< +<<<<<<<<<<< $NULL, $PhoneNumber, $NumPieces @<<<<<<<<<<<<<<@<<@<<@<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $DatRcvd, $Month,$Day,$Year, $SubmittedBy . write;
If I take out the '@' in the beginning of each line I get:US LEC 8210 University Exec Park Dr. 1 of 4 704.319.6297 20 10 07 2002 Chad Johnson
<<<<<<<<<<<<<<US LEC <<<<<<<<<<<<<< <<<<<<<<<<<<<<8210 University Exec Park Dr. 1 of 4 <<<<<<<<<<<<<<704.319.6297 20 10 07 2002 Chad Johnson
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: indenting with 'format'
by zigdon (Deacon) on Oct 07, 2002 at 16:54 UTC | |
by gnu@perl (Pilgrim) on Oct 07, 2002 at 17:34 UTC | |
|
Re: indenting with 'format'
by VSarkiss (Monsignor) on Oct 07, 2002 at 17:34 UTC |