#!/usr/bin/perl
#
# e.g.
# change http://ldc.upenn.edu/myl/llog/paradox.png
#   to
#   http://languagelog.ldc.upenn.edu/myl/llog/paradox.png
# and
# change http://ldc.upenn.edu/myl/CoherenceGraph.gif
#   to
#   http://languagelog.ldc.upenn.edu/myl/ldc/CoherenceGraph.gif
my $file = shift @ARGV;
    print "File is $file\n";
rename($file, $file.'.bak');
open(IN, '<'.$file.'.bak') or die $!;
open(OUT, '>'.$file) or die $!;
while(<IN>)
{
    $_ =~ s/http:\/\/ldc.upenn.edu\/myl\/llog/http:\/\/languagelog.ldc.upenn.edu\/myl\/llog/g;
    $_ =~ s/http:\/\/ldc.upenn.edu\/myl/http:\/\/languagelog.ldc.upenn.edu\/myl\/ldc/g;
    print OUT $_;
}
close(IN);
close(OUT);

