in reply to Re: Can a Perl Script call another perl script?
in thread Can a Perl Script call another perl script?

Good answer, chargrill(++), but a Windows-based perl noob may have trouble translating the quotes. Here is the Windows command-line equivalent:
perl -ne "system qq[perl search.pl -pattern $_ -ignorecase c:\\inetpub +\\wwwroot\\iprt]" mylist.txt
FYI: the "-ne" makes perl read the file, and pass each record as "$_" into the code specified, looping until the file is read. Hence, the perl code in the square brackets gets executed for each line of the input file.

     "For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken

Replies are listed 'Best First'.
Re^3: Can a Perl Script call another perl script?
by chargrill (Parson) on Jan 28, 2006 at 08:39 UTC

    Huh. Granted, it's been a long time since I've Perled on windows, but I thought it would be OK with the quotes as written.

    Slight correction, it's just the -n that does that, the -e lets you specify the 'script' in its entirety on the command line.

    I was leaving the explanation of -ne as an exercise to the reader, or in this case the OP.



    --chargrill
    $/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ } + sig map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu +" );
Re^3: Can a Perl Script call another perl script?
by Anonymous Monk on Jan 30, 2006 at 22:11 UTC
    Many thanks to CharGrill and Netwallah. The command works well.