#!/usr/bin/perl -w use strict; use IO::Scalar; my $str; tie *STDOUT, 'IO::Scalar', \$str; print "hello, world"; untie *STDOUT; print "The data is here: ",$str;
--
John.
In reply to Re: Redirecting STDOUT to a variable
by jmcnamara
in thread Redirecting STDOUT to a variable
by Dave05
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |