in reply to Global symbol probs...

while($htmlLines[$i] =~ m/<IMG\s+([^>]+)>/ig)

Well $i is undefined and undeclared here. Perhaps you want to have another loop? Not that processing HTML line by line is useful....

s/<IMG\s+([^>]+)>/ig//ig

You are dividing the result of the substitution by the result of calling the (undefined) function ig?

Abigail

Replies are listed 'Best First'.
Re: Re: Global symbol probs...
by Anonymous Monk on Aug 07, 2003 at 15:47 UTC
    Hello Abigail, Much thanks for the help. I'm just trying to get onto my Perl feet at the moment, so processing line by line is just an exercise for me. The regexp that I've put together is wrong, as you (and others) have highlighted, so I've change it to this:
    s/<IMG\s+([^>]+)>//ig
    No more errors, as I included a lexical variable, $i, for the while loop. Haven't managed to remove the image tags yet... Cheers, Richard