>> if ($line =~ /<!-- begin body-content -->(.*?)\/p>/i) {
> if ($line =~ /<!-- begin body-content -->(.*?)\/p>/is) {
The difference is 's' allows the '.' to match newlines - you probably
have one or two before the first </p> tag. Thist
$line =~ s/[\r\n]+//g;
will help in case your running platform has a different '\n' ($\ or $/ I
always forget) def. than the web server (which are supposed to *alway*
return '\r\n' but ....). Bill is, of course (as always, er, often ;-)
right - you're quickly heading toward using a proper html parser module -
its rare that you ever get away w/ parsing html by hand and have it work.
Remember:
< /p >
and:
<
/p
>
are valid </p> tags (I believe) so ... YMWillV
a
Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738 FAX 264-5932
Contrariwise," continued Tweedledee, "if it was so, it might be, and
if it were so, it would be; but as it isn't, it ain't. That's logic!"
-- Lewis Carroll, "Through the Looking Glass"
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs