Maybe it is enough to use sprintf:
use strict; use warnings; my $x; $x = sprintf ("%s","this is stored in \$x"); $x .= sprintf ("%s","... and this too\n"); print $x;
citromatik
Update:Corrected sprintf syntax
In reply to Re: Redirect STDOUT to a $variable
by citromatik
in thread Redirect STDOUT to a $variable
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |