in reply to get log file files

My tool of preference here is split. You could do something like this:
my @hosts; while (<INPUT>) { # log file lines have multi-character domain names at the start if (/^\w+/) { my $file = (split(/\|/, $_, 3))[2]; if ($file =~ s!/access_log\.(.+)$/) { push @hosts, $1; } } }
Other approaches are equally valid. (Hey, davorg's book is full of nice tricks like this.)