use File::Find; my %titles; sub wanted { if( $_ =~ /\.html?$/) { my $name = $File::Find::name; open ( F, $name ) or die "$!: $name\n"; while($line = <F>) { if($line =~ /<title>(.+)<\/title>/i) { $titles{$1} = " "; } } close F; } foreach my $key (keys %titles) { print "Title = $key\n"; } } find( \&wanted, "/unixpath/webfiles" );
In reply to Re: Getting unique data from search.
by Three
in thread Getting unique data from search.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |