Formating with printf in using two functions
- by user317203
I am trying to output a document that looks like this.
http://pastebin.com/dpBAY8Sb
my issue is that I cannot find how to format the output I have to have a floating poing and format the distance between columns. My current code looks something like this.
if (defined $longitude){
printf FILE ("%-8s %.6f","",$longitude);
}else{
$longitude = "";
printf FILE ("%-20s ",$longitude);
}
but the extra "" throws off the whole column and it looks like this.
pastebin.com/kcwHyNwb