my $pattern = 'http://www.blah.com/cgi.pl?id=&blah'; my $matched =($pattern =~ /(\<\w+\>)/,$1); print "$matched"; ####