perl -ne "BEGIN{$/=' '}print qq!$1\n! if m!(http:[\w\.\-:/]+)!" index.dat > outfile.txt