in reply to •Re: writing to a variable
in thread writing to a variable

Thanks all for your replies. Unfortunately we're using Perl 5.6, Win32. We can't go to 5.8, as some of the libraries don't exist for that version. Likewise, IO::Scalar isn't available as a ppm package. However, I have tried using IO::String - and I'm obviously missing something. I'm a newbie, so apologies in advance for whatever is wrong with my code:
use IO::String; use strict; my $output; tie *IO, IO::String->new($output); my $col1 = "first"; my $col2 = "second"; write (IO); print $output; format IO = =============== ==================== @<<<<<<<<<<<<<: @<<<<<<<<<<<<<<<<<<< $col1, $col2
I was hoping that printing $output would give me the report. Any advice appreciated