It's just a syntax error in line 2, you can't match this way. $ is used for matching the end of a line. If you want to match the "$" sign you may use \$ . In all other cases $ is used for variables. Trying to match $* is no correct syntax. I guess you are trying to substitute several whitespaces (blanks) with a single one; try this:
$pageHTML =~ s/\s+$/ /g;
instead.
|