Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    
  2. or download this
    use Time::Local;
    $today = timelocal(localtime);
    
  3. or download this
    $today = time;
    
  4. or download this
    $datafile=`cat ../hosts/iplist.txt | sort -r | sort -u -t ',' -k 2,2 >
    + ../hosts/latestip.txt`;
    
  5. or download this
    $datafile = `sort -r ../hosts/iplist.txt | sort -u -t ',' -k 2,2 > ../
    +hosts/latestip.txt`;
    
  6. or download this
      my $count = 0;
    
  7. or download this
    open (DATA,"/home/myplace/hosts/latestip.txt") || die ("Can't Open dat
    +a File \n");
    @data=<DATA>;
    close DATA;
    
  8. or download this
    open PIPE, '-|', 'sort -r ../hosts/iplist.txt | sort -u -t ',' -k 2,2'
        or die "Cannot open pipe from sort because: $!";
    ...
    
    close PIPE or warn $! ? "Error closing sort pipe: $!"
                          : "Exit status $? from sort";
    
  9. or download this
    $x=0;
    
  10. or download this
    sub header_response
    {
    ...
            print "    </BODY></HTML>\n";
        return;
    }
    
  11. or download this
    print <<'HTML';
    Content-type: text/html
    ...
    <BR><BR><BR><BR>
        </BODY></HTML>
    HTML