As far as the Windows Find tool goes (which I know wasn't your original
question)... If the file name is in quotes, i.e. "Mortgage Market*" (WITH
the quotes), it performs as expected.

As far as perl goes... 

Try replacing the spaces with questions marks. Also, FYI: glob will return
an array of names, so try:

@myFileList = glob "Mortgage?Market*"

foreach $myFile (@myFileList) {
        # do whatever
}



Russell J Foster
Subject, Wills, & Company
e. [EMAIL PROTECTED]
v. 630-572-0240
 


-----Original Message-----
From: McCollum, Frank [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 28, 2002 3:10 PM
To: [EMAIL PROTECTED]
Subject: Matching for filenames with spaces in them?




I asked this earlier but got no response, so all that is different is the
subject.  Surely, there is some one in this group who can answer this
seemingly simple problem!  -Frank

> I am guessing that the spaces are the problem, because if I put the 
> same string in the Windows Find tool, I get the same unexpected 
> results.  I have this code below and expect to get the file named...
"Mortgage Market
> Review Package (25 Jan        ", but instead I get a single word,
> "Market", which is not a file.  Any insight into this?  (I've tried 
> with an without the "\" in front of the spaces)
> 
> 
>       chdir "L:/Desks/Agency\ Passthru\ Trading/Reports/";
>       $myNewFile =  glob "*Mortgage\ Market\ Review\ Package*" ;
>       print "$myNewFile\n";
> 
> 
> 
> Thanks,
> Frank McCollum
> Bank Of America Securities, LLC [EMAIL PROTECTED]
> (704) 388-8894
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to