Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Redirect STDOUT to a $variable

by citromatik (Curate)
on Aug 10, 2007 at 11:44 UTC ( [id://631769]=note: print w/replies, xml ) Need Help??


in reply to Redirect STDOUT to a $variable

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://631769]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-24 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found