I am parsing some data and organizing it, and now I need to commit it inside a variable.
I have never used printf or sprintf before.
I use printf in this way to organize the data:
printf("%-30s %18s %18s\n", "$a", "$b", "$c\n");
Now I have a variable that stores the string, and I want to add organized data to the $ result variable.
I tried something like
$result.printf("%-30s %18s %18s\n", "$a", "$b", "$c\n");
and it does not work. I also tried sprintf.
Any ideas?
Thanks, S
source
share