#!/usr/bin/perl -w # Print only the urls who registered at least two size change # of at least 1 KB (1024 bytes) # Not using just 1 size change because it could be due to # a url that was 404 and later became 200 or vice versa # only catch if going back and forth use strict; my $fn = "url_size_changes.txt"; open(FILE, $fn) or die("Unable to open $fn: $!"); # header line contains dates my $line = ; chomp($line); # Print first row of dates print "$line\n"; while ($line = ) { chomp($line); my ($url, @sizes) = split(/\t/, $line); my $print_value = 0; foreach my $size (@sizes) { if ($size <= -1024 || $size >= 1024) { $print_value = 1; } } print "$line\n" if ($print_value == 1); } close FILE;