in reply to Appending print to a variable
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Appending print to a variable
by eric256 (Parson) on Jul 30, 2003 at 16:53 UTC | |
by ChrisS (Monk) on Jul 30, 2003 at 17:08 UTC |