Help for this page

Select Code to Download


  1. or download this
    use POSIX qw(strftime);
    
    $time= localtime(time-(24*60*60));
    $yesterday = strftime( '%d/%m/%y', $time);
    
  2. or download this
    `grep "$yesterday" logfile.log | wc -l`
    
  3. or download this
    open(LOGFILE,"<", "access.log")or die"Could not open log file.";
    my @logfile = <LOGFILE>
    my $hits = grep /$yesterday/, @logfile;