How do I get the wanted function in a find call to ignore file names with spaces in them? I want to catch all files with the suffii '.pro' and .'idl' but some Windows user has put files like 'Foo Bar Har.pro' on the system. I am trying:

  sub wanted {
    if (/\.(pro|idl)$/ && !/\w+\s+\w+/) {
      ## do some fancy stuff
    }
  }

but the evil files with spaces in their names seem to be slipping through the regexp. Any suggestions?

--
-- Jason Dusek      ("`-''-/").___..--''"`-._
-- |                 `6_ 6  )   `-.  (     ).`-.__.`)
-- |                 (_Y_.)'  ._   )  `._ `. ``-..-'
-- |               _..`--'_..-_/  /--'_.' ,'
-- |              (il),-''  (li),'  ((!.-'
--

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to