http://www.perlmonks.org?node_id=169399


in reply to Regex Bug?

.*? is a minimal match, try $url =~ s/(.*?)\?(.*)/$1/gs; or just  $url =~ s/\?.*//gs;