#!/usr/bin/perl use strict; use warnings my $file = "Name.txt" open(IN, "<", $file) or die "I cannot open a file: $file "; while(my $line =){ ## reading a file line by line # here you need to put some regular expression to identify your web addresses }