That's
exactly what I'm trying to do, GrandFather and ikegami.
Thanks to both of you for kicking the brain cells into gear, because I suppose I'm trying to do a little bit of both.
I recalled that previous discussions with my boss is that after getting something that parses the file --which we did, just nowhere near as clean as the html::parser-- then try to either skip/strip:
nbsp's
the asterixes '*'
and stop on the line where/when it encounters either "Mean" or a series of "bold" tags.
ikegami, I see what you're saying, but the only educated guess I had was to do something like this in GrandFather's code:
for (0..$theTable->maxcol())
{
my $cellText = $theTable->cell ($row, $_)->as_text ();
# Next two lines are for searching and replacing nbsp's with regular
# spaces or evaluate such that if $celltext ='s nbsp or * not
#to print it
# printf("nbsp is \\x{%04X}\n", ord(substr($string, $pos, 1)));
# printf("nbsp is \\x{%04X}\n", ord(substr($cellText, $row, 1)));
# s/\x{1234}/ /g;
print "$cellText ";
}
The above is a educated/SWA guess, as I don't have my Perl book handy, but it'd be something like:
if $cellText = nbsp or *, do nothing
elseif print $cellText.
Sound about right?
Gotta go to bed, but many thanks for your helping the noob
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.