in reply to File write problem
open PL, 'pvclength.txt' or die "Cant open file"; $pvc_l=<PL>; chomp $pvc_l; open GIL, 'gilength.txt'or die "Cant open file"; $gipipe_l=<GIL>; chomp $gipipe_l; open QGBS, 'qgibendsocket.txt' or die "Cant open file"; $gibend_sck_q=<QGBS>; chomp $gibend_sck_q;
See chomp.
You also mention in your OP you "tried removing whitespace from the Qty variables". How? What code did you use? This should be straight-forward using regular expressions.
Please note that because all your variable names are different lengths, your columns will not align - you have a different number of spaces following each one. Again, a simple solution is to follow dHarry's advice and use sprintf.
Also, note you dropped a sigil off of pvc_l in your OP. Please get in the habit of testing code before you post so Monks don't go off chasing red herrings. See How do I post a question effectively? and make sure posted code passes strict and warnings.
Update: Fixed oversights in code. Thanks wfsp.
|
|---|