Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: File download statistics parsing

by l2kashe (Deacon)
on Aug 07, 2003 at 14:48 UTC ( #281909=note: print w/replies, xml ) Need Help??


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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://281909]
help
Chatterbox?
[choroba]: As discussed in Using the DATA file handle for ARGV, I usually start my "fun" scripts with *ARGV = *DATA{IO} unless @ARGV;
[choroba]: this was just a remainder
[Discipulus]: ah thanks i forgot that thread (even if i saved it in my homenode)..
[Discipulus]: the node i discovered yesterday nigth was also interesting

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2016-12-06 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (101 votes). Check out past polls.