#!/usr/bin/perl use strict; use warnings; my @lines_found; for my $file (glob('/kunden/homepages/20/d264326328/htdocs/logs/access.log*')) { next unless(-f $file); if(open(my $fh, '<', $file)) { while(my $line=<$fh>) { push(@lines_found,$line) if($line=~m!"(?:POST |GET .*=(?:htt|ft|ph)p(?::|%3a)(?:/|%2f)).* HTTP/[0-9]\.[0-9]" [23][0-9]{2}!i) } close($fh); } else { warn "ERROR open $file ($!)\n"; } } print $_ for(@lines_found);