in reply to Question regardin Pod::Simple usage
Since you wanted to have the output in a string this example uses perl 5.8's really useful feature of opening a scalar as a filehandle. For older perls you could use IO::Scalar instead.
#!/usr/bin/perl -w use strict; use Pod::Select; # perl 5.8 feature, open a scalar as a filehandle open my $fh_out, '>', \my $pod or die "Couldn't open filehandle: $!"; my $fh_in = \*DATA; my $parser = Pod::Select->new(); $parser->parse_from_filehandle($fh_in, $fh_out); print $pod; __DATA__ # Some code my $foo = 'bar'; =head1 This is a B<heading> This is a paragraph. This is a verbatim section. This is I<B<another>> paragraph =cut
--
John.
|
|---|