#!usr/bin/perl use warnings; use strict; my $line; while (my $line = ) { (my $url) = $line =~ m/.*a href="(.*)".*/; next unless $url; print "$url\n"; } =Prints javascript:history.back() http://www.sec.gov/index.htm">SEC Seal EDGAR Filing Documents for 0000927356-01-000365 .... abreviated to reduce space.....