Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Searching directories for HTML title tags

by chromatic (Archbishop)
on Jun 20, 2001 at 08:06 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-24 09:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found