#! /usr/bin/perl while (1){ unlink ("index.html"); $content = `wget -nv http://whatsmyip.net/`; open FILE,"index.html"; @content = ; close FILE; open DATA, ">>ipchanges.log"; foreach $line(@content){ if ($line =~ ""){ $line =~ s/://g; $line =~ s/<title>//g; $line =~ s/<\/title>//g; $line =~ s/ //g; $line =~ s/What'sMyIP-YourIPis//g; $data = `date`; chomp $data; chomp $line; $line =~ s/\t//g; $line =~ s/\n//g; if ($line !~ $oldip) { print DATA "***$data***@***$line***CHANGED***\n"} else {print DATA "***$data***@***$line***SAME***\n"} $oldip = $line; } } sleep 60; close DATA; }