/[swish]/trunk/spider/progspider
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/spider/progspider

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 48 by dpavlin, Tue Jan 20 16:01:13 2004 UTC revision 50 by dpavlin, Tue Jan 20 18:13:32 2004 UTC
# Line 21  sub file { Line 21  sub file {
21          my $path = $_;          my $path = $_;
22    
23          open(F,"$path") || die "can't open file: $path";          open(F,"$path") || die "can't open file: $path";
24  #       print STDERR "$path";  #       print STDERR "$path\n";
25          my $contents;          my $contents;
26          while(<F>) {          while(<F>) {
 #               chomp;  
 #               chomp;  
 #               $contents .= " ".$_;  
27                  $contents .= $_;                  $contents .= $_;
28          }          }
29    
 #       $contents =~ s/<(\/*\w+)\s+>/<$1>/g;  
   
30          $contents = filter($contents);          $contents = filter($contents);
31    
32    #       die "zero size content in '$path'" if (! $contents);
33            return if (! $contents);        # don't die on empty files
34    
35          my $mtime = time;          my $mtime = time;
36          my $size = length $contents;          my $size = length $contents;
37    

Legend:
Removed from v.48  
changed lines
  Added in v.50

  ViewVC Help
Powered by ViewVC 1.1.26