I have a few log files like these:
- /var/log/pureftpd.log
- /var/log/pureftpd.log-20100328
- /var/log/pureftpd.log-20100322
Is it possible to load all of them into a single filehandle or will I need to load each of them separately?
One ugly hack would be this:
local @ARGV = qw(
/var/log/pureftpd.log
/var/log/pureftpd.log-20100328
/var/log/pureftpd.log-20100322
);
while(<>) {
# do something with $_;
}
ARGV filehandle to implicitly open on each file in @ARGV.@ARGV. For for a quick one-off script, it's fine.You could use pipes to virtually concat these files to a single one.