in reply to Re^5: Using File::DosGlob::glob in loop only works first time
in thread Using File::DosGlob::glob in loop only works first time

Well, yes, the '\' didn't help, but leaving it blank in the Windows world wasn't helping either; the string wouldn't hang together as a single argument and so I needed to find some kind of glue to submit the file name in toto to the -f test. Perhaps it's overkill, but the current solution of using globbing with a slice does what I want. :-)
  • Comment on Re^6: Using File::DosGlob::glob in loop only works first time

Replies are listed 'Best First'.
Re^7: Using File::DosGlob::glob in loop only works first time
by ikegami (Patriarch) on Feb 26, 2006 at 00:12 UTC
    Like I said originally, no glue necessary, just:
    # From DB $template_file = "C:/Program Files/DirDictate/soap_form/soap_final.dot +"; unless ( -f $template_file ) { ... }
    If you got that from the command line, still no glue necessary:
    # Called as: # perl script.pl "C:/Program Files/DirDictate/soap_form/soap_final.d +ot" $template_file = $ARGV[0]; unless ( -f $template_file ) { ... }