The above should print "Hello World!" and works with string data. You might need to check the perldocs for the various options in the format specification string ("%s").$input = "Hello"; $output = sprintf("%s", $input . " World!"); print $output;
perldoc -f sprintf
In reply to Re: Appending print to a variable
by ChrisS
in thread Appending print to a variable
by eric256
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |