http://qs321.pair.com?node_id=281909


in reply to File download statistics parsing

# snip ... # I know this is evil, it's a hack. my $count = `/bin/grep $basefile /var/log/squid/access.log | /usr/bin/wc -l`; $count =~ s/^\s+//g; # so lets not hack it.. open(IN, "/var/log/squid/access.log") or die "opening access.log: $!\n +"; my $count = grep(/$basefile/, <IN>); close(IN);

Happy hacking :)

use perl;