[ABE.pm] printing to a variable
Ted Fiedler
fiedlert at gmail.com
Mon May 22 03:24:43 PDT 2006
Perl6::Form - This is also a pretty nice module, althought I have not
used it yet, I have been quite eager to. It runs on Perl5.
http://search.cpan.org/~dconway/Perl6-Form-0.04/Form.pm
BTW - Ive been lurking on this list for quite some time, do you have
regular meetings?
Ted Fiedler
On 5/19/06, Ricardo SIGNES <rjbs-perl-abe at lists.manxome.org> wrote:
> * "Faber J. Fedor" <faber at linuxnj.com> [2006-05-19T14:31:37]
> > Can I print TO a variable?
> >
> > I want to use Perl's report formatting capability to generate text
> > output but I want to store the output in a variable as opposed to
> > printing to a file.
>
> by "report formatting" do you mean "format"? Format is the devil. Avoid it.
> Consider using a real templating system, like Template.pm, instead.
>
> ...but yet. You need to create a filehandle that can write to a scalar.
>
> use IO::String;
>
> my $string;
> my $io = IO::String->new($string);
>
> print {$io} "This will be appended to the string.";
>
> --
> rjbs
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
>
> iD8DBQFEbmf95IEwYcR13KMRAoG3AJ9irtbT1903ulhC6lV3UWiE9xTDIgCfeoWH
> 7NVDmPBm20zjYaBhLAHKndQ=
> =9DNq
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> ABE-pm mailing list
> ABE-pm at pm.org
> http://mail.pm.org/mailman/listinfo/abe-pm
>
>
--
One of my most productive days was throwing away 1000 lines of code.
-- Ken Thompson
More information about the ABE-pm
mailing list