Software: ActivePerl on Windows XP
Scenario: I have a list of strings to search in a folder and subfolders.
1. The list of strings is in a text file, say mylist.txt
2. I have a Perl script called search.pl that searches a specific string in a folder and subfolders. this works and is executed at the DOS command line as below: perl search.pl -pattern mysearchstring -ignorecase c:\inetpub\wwwroot\iprt
3. I need help to write a new Perl script that reads mylist.txt and for each string read in, it will feed that string to the search.pl script when calling it.
For example
mylist.txt has:
STRINGA
STRINGTEXTB
etc...
This new script will call search.pl passing STRINGA as pattern to search.
I think I can look up the tutorial to open mylist.txt and loop through its records.
What I don't know is how to call search.pl passing what is read in as string to search?
Search.pl is to be called with the same flags for each search string, same folder but the search string is parametized based on what is read in from mylist.txt.
Syntax for search.pl
search.pl -pattern <<searchparm>> -ignorecase c:\inetpub\wwwroot\iprt
Thank you and pardon my ignorance with Perl.

In reply to Can a Perl Script call another perl script? by Anonymous Monk

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.