in reply to Template Toolkit output to a scalar?
According to perldoc -f open, you can do this with STDOUT, you just have to close it first.my $fake_file; open(my $fh, ">", \$fake_file) or die $!; print $fh, "foo\n"; print $fh, "bar\n"; print $fake_file;
thor
Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Template Toolkit output to a scalar?
by theguvnor (Chaplain) on Jan 15, 2005 at 17:34 UTC | |
by merlyn (Sage) on Jan 17, 2005 at 17:12 UTC | |
by Tanktalus (Canon) on Jan 17, 2005 at 17:28 UTC |