When writing these values and other computed values to a report file(.doc) using the code below:open PL, 'pvclength.txt' or die "Cant open file"; pvc_l=<PL>; open GIL, 'gilength.txt'or die "Cant open file"; $gipipe_l=<GIL>; open QGBS, 'qgibendsocket.txt' or die "Cant open file"; $gibend_sck_q=<QGBS>;
The expected output is:printf EH "\n Item"; printf EH "\n No Descr. Qty Unit Rate Comp. + Party"; printf EH "\n 70 Pvc 4sqmm $pvc_l MTR 35.14 0.00 + $pvc_a"; printf EH "\n 71 Gi Pipe 25mm $gipipe_l MTR 94.93 0.00 + $gipipe_a\n"; printf EH "\n 73 Gi Bend $gibend_sck_q NO 50.00 0.00 + $gibend_sck_a\n"; printf EH "\n &Socket25mm\n";
But the output I get is this i.e. everything after the Qty figure appearing on the second lineItem No Descr. Qty Unit Rate Comp. Party 70 Pvc 4sqmm 2 MTR 35.14 0.00 70.28 71 Gi Pipe 25mm 3 MTR 94.93 0.00 284.79 73 Gi Bend 4 NO 50.00 0.00 200 &Socket25mm
How to get around this problem? I tried removing whitespace from the Qty variables for example $pvc_l but that did not work. Any advice would be appreciated. Thanks.Item No Descr. Qty Unit Rate Comp. Party 70 Pvc 4sqmm 2 MTR 35.14 0.00 70.28 71 Gi Pipe 25mm 3 MTR 94.93 0.00 284.79 73 Gi Bend 4 NO 50.00 0.00 200 &Socket25mm
In reply to File write problem by perl_seeker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |