Thank you for replying. It has moved me forward a little. Upon using:
my $remove = q{<div><div class="blue"></div></div>};the variable then works in the if statement.
my $str = qr{$line};or
my $str = q{$line}; <p>gives</p> <code>(?^:</div></div><div><div class="blue"></div></div> )
to the console, and
( $line = $str ) =~ s/$remove//;gives
(?^:</div></div> )
You are right; I did get a warning before but misunderstood it. Now, adding r to the substition gives another warning:
Useless use of non-destructive substitution (s///r) in void context at lr.pl line 76.
So I'm still in void context, which is bad, right? And I now have this
(?^: )
to learn about. I also tried using
while (<$HTML>)with
$_and writing to a separate file, which is getting warmer, actually removing some of the correct things, but leaving behind
(?^:</div></div> )
I'm also still using print because say doesn't work for me; it asks for a package. If that little lot prompts no further clues to anyone I shall read on; thanks for your time on this.
In reply to Re^2: Strip specific html sequence
by koober
in thread Strip specific html sequence
by koober
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |