#!/usr/bin/perl #tries to find links in specified text file #usage: perl linky.pl file.to.parse open (F, <@ARGV[0]>) || die "file not found: $!\n"; print "\n"; @list = (); while ($line = ) { @line = split(" ", $line); foreach $le(@line) { if ($le =~ /http:/) { $le =~ s/^.*http/http/; push(@list, $le); } } } close F; %seen = (); foreach $item (@list) { push(@uniq, $item) unless $seen{$item}++; } foreach $link(@uniq) { print "$link\n"; } print "\n";