Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I really need the output to show distinct output of the results such as:Title = Index Home Title = Index Home Title = Index Home Title = Index Home Title = Home Page Title = Next Page Title = Next Page Title = Next Page
Here is my attempt. Can someone advise how I can do this???Title = Index Home Title = Home Page Title = Next Page
use File::Find; sub wanted { if( $_ =~ /\.html?$/) { my $name = $File::Find::name; open ( F, $name ) or die "$!: $name\n"; while($line = <F>) { if($line =~ /<title>(.+)<\/title>/i) { print "Title = $1\n"; } } close F; } } find( \&wanted, "/unixpath/webfiles" );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Getting unique data from search.
by Wonko the sane (Deacon) on Nov 14, 2002 at 14:43 UTC | |
by Anonymous Monk on Nov 14, 2002 at 14:55 UTC | |
by jdporter (Paladin) on Nov 14, 2002 at 16:30 UTC | |
by Anonymous Monk on Nov 14, 2002 at 19:41 UTC | |
by jdporter (Paladin) on Nov 14, 2002 at 20:12 UTC | |
Re: Getting unique data from search.
by Callum (Chaplain) on Nov 14, 2002 at 14:42 UTC | |
Re: Getting unique data from search.
by Three (Pilgrim) on Nov 14, 2002 at 16:30 UTC |