You might try:
system("secondapp $switches \"$filelist[$i]\"")
which should make the second argument the filename regardless of whether
it has spaces or not.
Wags ;)
I am having hell with blanks in file and
directory names. I have an application that gets a list of files (using
opendir/readdir) then runs a second perl application (perlapp
binary) on them, one by one. So the absolute path/filename from the list
is passed to the second app as an argument, as in system("secondapp $switches
$filelist[$i]")
This works great unless there are blanks embedded
in $filelist[$i]. In that case, when secondapp
runs, $ARGV[1] is truncated at the first blank so obviously it can't
open the file. Do I have to escape the blanks in @filelist before
starting these calls?
tia....Steve
**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************
|