Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Searching directories for HTML title tags

by chromatic (Archbishop)
on Jun 20, 2001 at 08:06 UTC ( #89914=note: print w/replies, xml ) Need Help??


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. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://89914]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (1)
As of 2021-09-28 23:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?