bitman has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl use strict; use warnings; open(DM,">c:/test1.txt"); my ($r_fran,$r_par,$r_con,$r_pcode,$r_ser,$r_add1,$r_add2,$r_email,$r_ +acc,$r_name) =("aaa","123","321","bs11","o","14 street","town",'sp@here',"00123","s +cott"); my $edate=localtime(time); format DM_TOP = High Value Report for depot @<<<< on @<<<<<< +<<<<<<<<<<<<<< page @## ,$r_fran, $edate +, $% Parcel Number Account Consignment Name & Address + Postcode Srvc ------------- ------- ----------- -------------- + -------- ---- . format DM = @<<<<<<<<<<<< @<<<<<<<< @<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<< + @<<<<<<<< @<<<< $r_par, $r_acc, $r_con, $r_name, + $r_pcode, $r_ser @<<<<<<<<<<<<<<<<<<<< $r_add1 @<<<<<<<<<<<<<<<<<<<< $r_add2 Driver Signature Superviser Signature ----------------------------------- ---------------------------- +------- Driver Signature Superviser Signature ----------------------------------- ---------------------------- +------- . write DM; close DM; open(DM,">c:/test2.txt"); ($r_fran,$r_par,$r_con,$r_pcode,$r_ser,$r_add1,$r_add2,$r_email,$r_acc +,$r_name) =("zzz","123","321","bs11","o","14 street","town",'sp@here',"00123","s +cott"); $edate=localtime(time); write DM; close DM;
2006-03-24 Retitled by Arunbear, as per Monastery guidelines
Original title: 'Format'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Format headers and filehandles
by socketdave (Curate) on Mar 24, 2006 at 14:21 UTC | |
by fmerges (Chaplain) on Mar 24, 2006 at 14:46 UTC |