in reply to format and IO::String
Also, as runrig pointed out write won't work directly with IO::Scalar.
The following is a example of putting formatted text into a variable. If you really need it in a IO::Scalar you can transfer it on from there.
#!/usr/bin/perl -w use strict; my $temp; my $format = '@||| @||| @|||'; my $t1 = '1'; my $t2 = '2'; my $t3 = '3'; # Create the format formline($format, $t1, $t2, $t3); $temp = $^A; # Store the accumulator $^A = ''; # Clear the accumulator print $temp;
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: format and IO::String
by Flame (Deacon) on Jan 31, 2002 at 00:05 UTC |