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 ;)
 
-----Original Message-----
From: Steve [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 15, 2003 09:43
To: [EMAIL PROTECTED]
Subject: blanks from hell!

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.
****************************************************************

Reply via email to