Bruce Ambraal wrote: > This is where I am at: > A script that does not really work > > #!/usr/bin/perl -w > use strict; > > open(A_file,"<search.html") || die "can't read search.html:$!"; > > my @ary = <A_file>;
you should read the faq about why this is a bad idea. http://www.perldoc.com/perl5.6/pod/perlfaq5.html#How-can-I-read-in-an-entire-file-all-at-once- > my $n = 0; > while($n <= $#ary){ > > chomp($ary[$n]); > > while($ary[$n] =~ s#.*(href = http.*)\s.*#$1#){ > > $ary[$n] =~ s/<.*>//g; > > $ary[$n] =~ s/>.*//g; > > print $ary[$n],"\n"; > } > $n++; > } there's modules on cpan you can use to parse html without having to roll your own regex. i'd start with this one: http://search.cpan.org/search?dist=HTML-Parser -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
