in reply to Re^4: Pattern Matching Q?
in thread Pattern Matching Q?

the matching operators work against the $_ default variable, unless otherwise specified. The easiest thing to do here is to load that variable with he contents that you want to search, preferably within a local block:
my $url = undef; local{ $_ = $mech->content; #not sure if mech let's you do #this...basically you want to load #the $_ var with the data that holds #the url m{<strong.*?(http://.*?)&}; $url = $1; } print $url;