http://qs321.pair.com?node_id=89914


in reply to Re: Searching directories for HTML title tags
in thread Searching directories for HTML title tags

A couple of quick notes. You can sharpen the regex in html_files():
sub html_files { push @data, $File::Find::name if /\.s?html?$/i; }
I'd pass in $File::Find::name as a parameter just to encapsulate things further. merlyn might point out that using $ as an anchor will break if there's a newline at the end of the filename, but that shouldn't be a problem. (\z is safer.) Finally, I don't know why you have m?, but using /i makes it the regex case-insensitive. Saves time.

I'd also get rid of $temp in fileRead(). Always bugs me. :)