my @vulnerabilities = qw( http://www.parismatch.com/recherche/recherche?motcle="%2F>xss+death-angel&x=5&y=6 https://www.simplydomains.co.nz/register.php/ref="> https://www.simplydomains.co.nz/logon/ref="> https://www.eso.shell.com/eso/e_invoice_jsp/req_form_uk2.jsp?countrycode=18&language=%22%3E%3Cscript%3Ealert(%22daimon%22)%3C/script%3E ); foreach my $vuln (@vulnerabilities) { my ($file) = $vuln =~ m{^/.*?([^/]+)[\?/]}; print $file, "\n"; } #### recherche register.php logon req_form_uk2.jsp