$/ = "";
while (<FILE>) {
if (/^=(\w+)\s*(.*)/s) {
# $1 is command (e.g., head1)
# $2 is rest of paragraph
} elsif (/^\s+/) {
# literal paragraph
} else {
# body paragraph
}
} |
| Forward to Editors
Back to OO Flex Up to Stages of a Perl Programmer section index Up to YAPC 2000 course index |
YAPC 2000: Stages of a Perl Programmer - 42
Copyright © 2000, Nathan Torkington
|