in reply to Matching HTML Comments

perhaps your regex is to greedy. Try this:
if ($response->content =~/<!-- \[error\] -->(.+?)<!-- \[\/error\] -->/ +m +) { print "$1\n"; }
UpdateCorion notes, that my? was outside the parentheses.
Boris