Dear Monks - I have been trying to get an perl algorithm or a proper logic to start my goal(below).I have tried various ways to achieve this with but no luck,vexed of it.I want to start all -over again from the scratch.Really appreciate if the monks help me to formulate a right logic in perl for each step below ?

1.I have a file data.txt which has list of all directory names 2.Now I want to grep every dir name in data.txt with the contents of +all the *.c files in the cwd recursively . 3.Now report only those files and the matching lines whose grep is case-sensitive meaning if we grep for "modem" in all the contents of * +.c,any .c file which has a different case other than "modem",meaning +Modem,moDEM etc,all such .c files need to be printed along with the m +atchingline

In reply to Help regarding an alogrithm by perl_mystery

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.