The other nodes answering this question are much better but I was just having so much I couldn't resist:
The data file:
foo
bar bza
#STANDARD Run from bombs! This describes the function bombs!
sub bombs {
print "We already caught Saddam...what now?";
}
#STANDARD Help! My HUMVEE is Broken! This describes the function Broke
+nHumvee!
sub BrokenHumvee {
print "I hit a landmine!";
}
1;
The code:
C:\Temp>perl -e "BEGIN{open(H,q|watchdog.dat|) or die $!; @watchdog =
+<H>; close
(H);} my $newFile; foreach my $watchdog (@watchdog){if($watchdog=~m/(#
+STANDARD.*
?function\s+(\S+)!)/){ $newFile .= qq|\=item| . ++$item . qq| $2\n$1\n
+|}}; END{
print qq|=head1 Functions\n\nThis is my list of functions\n\n$newFile\
+n\n=cut\n\
n|}" > sha.pod
Finally:
C:\Temp>pod2html sha.pod > see.htm
Celebrate Intellectual Diversity
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.