in reply to Searching for specific text

For the first question, well is the oldest question in the monastery How do I recursively process files through directories!

You can profit a non recursive solution by tachyon Re: Win32 Recursive Directory Listing but also Descending a directory tree, returning a list of files and Recursive Directory print (where Laurent_R explains why the tachyon's solution is not recursive)

You only need to adjust a solution to meet your extension requirements.

For the html file processing you just need a sub to call for such files: the sub must load the content and process the HTML with one of the several modules aimed to do this kind of work (HTML::Parser? HTML::TokeParser::Simple? HTML::TreeBuilder::XPath?). In fact very rarely you are allowed to parse HTML with regular expressions (even if you can).

HtH
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Searching for specific text
by mohad (Initiate) on Oct 20, 2015 at 09:01 UTC
    Thanks for the suggestion. can you please create an example in the above code upon which I'll be able to modify it as per my need? I'm just learning perl and would be of great help if i could learn from that.

      Providing "an example" might be of some teaching value; it almost certainly will allow you to turn it in to /boss|teacher|whomever/ as evidence of your learning. So my short answer is "Nope!"

      You'll actually learn a lot more by studying the references and the tutorials available here than by asking a gimmé like your OP.


      Spirit of the Monastery

      Questions containing the words "doesn't work" (or their moral equivalent) will usually get a downvote from me unless accompanied by:
      1. code
      2. verbatim error and/or warning messages
      3. a coherent explanation of what "doesn't work actually means.