http://qs321.pair.com?node_id=11117051


in reply to LWP::UserAgent & match

$todaysQuoteStr =~ quotemeta($todaysQuoteStr); ## I believe this escapes all characters that need to be escaped

Not quite, no. The right hand side uses quotemeta to do that but then you don't assign the result to anything. This will show the difference that an assignment makes:

#!/usr/bin/env perl use strict; use warnings; my $todaysQuoteStr = ' data-reactid="49"><span class="Trsdu(0.3s) Fw(b +) Fz(36px) Mb(-4px) D(ib)" data-reactid="50">'; $todaysQuoteStr =~ quotemeta($todaysQuoteStr); print "Bad: $todaysQuoteStr\n"; $todaysQuoteStr = quotemeta($todaysQuoteStr); print "Good: $todaysQuoteStr\n";