my $word = $_; # I guess word is undefined here my $url="http://dictionary.reference.com/search?q=$word";