From: "Johnson, Shaunn" <[EMAIL PROTECTED]> > I'm having a problem with trying to get > a list of files with spaces in them. > > I'm writing a perl script that goes into > a directory, get a list of files with spaces > in them (this is a file.doc) and run a > mkisofs command against it. > > I can get a list of the files: > > [example] > > $debug=2; > foreach $cmd (`ls -1 $report_dir`) > > [/example] > > This *looks* like it gives me what i want (a list > of directories that have spaces in them, but > when i try something like this:
Please don't shell out (start external processes) unless you have to. Use readdir or glob instead! > [example] > > { > $mkisofs -f -J -r -hide-joliet-trans-tbl -V 'Report' -T -v -o > '$iso_dir/$cmd.iso' "$report_dir"; > } > __END__ > [/example] print the command instead of executing it, Maybe you'll notice what the problem is. Also ... I don't see any system(), backticks or whatever in your code, didn't you copy&pasted the real code into your post? Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain. I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]