|
appending (s)printf output to string
I'm parsing some data and organizing it, and now I need to capture it inside a variable.
I've used printf in a manner like this to organize the data:
printf("%-30s %18s %18s\n", "$a", "$b", "$c\n");
Now I have a variable that's storing a string, and I want to append the organized data to the variable.
I tried something like $result.printf("%-30s %18s %18s\n", "$a", "$b", "$c\n");
and it doesn't work. I tried sprintf too.
Any ideas?
Thanks, S
|