On Fri, 11 Feb 2000, Stas Bekman wrote:
> > Stas, the example you supplied in the miniguide
> > (http://perl.apache.org/guide/performance.html#Forking_or_Executing_Subprocesse)
> > doesn't work.
> > It's because the scalar returned by FreezeThaw::thaw contains shell escape
> > chars, like: [|;] so system("program.pl $params") obviously will break.
>
> Argh, thanks for the spot Edwin. Do you think String::ShellQuote will
> solve this problem? Can you please try it? it's available from CPAN.
Stas, the interpreted form of system is always bad for this sort of thing.
Instead use the list form:
system("program.pl", $params);
Then the shell never sees it.
--
<Matt/>
Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.