open(SNOT,"shit.htm"); # open a file named shit.htm as handle SNOT while(<SNOT>) # read the file record by record { @x=split(" "); # split each line into the words seperated by spaces $k=0; # set k to 0 for ($i=0;$i<$#x;$i++)# loop thru each word on the line { if ($x[$i] =~ /http/i) #if the word contains the letters http (any case) { print "$x[$i]\n"; #print the word $k=$k+1; # add 1 to words found } } }