hi there,
i am trying to get the printf function to print a variable. the issue is complex (for me) as the variable i am trying to print(f) contains strings and integers. i would like to print in a nice format. is this possible.... ? see my example code:
my $pi = 3.14159; printf "%11s %3d %5.1f\n", "Hello there", 123, $pi; # this works fine +! $newarray="%11s %3d %5.1f\nHello there"; $newarray.=" 123 $pi"; printf $newarray; # this doesn't work :-( as the printf above, any id +eas?
20050213 Janitored by Corion: Added formatting
In reply to printf and variables by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |