in reply to Best practices - absolute paths?
(where you might want each thread to have its own "$workdir"), you could do it like this:chdir($workdir); foreach ($files) { workOnFile(); ## should have $_ as an arg, shouldn't it? }
If you think that's less efficient, try benchmarking it and see how much of a hit you take. I haven't actually tested it, but I expect the hit won't amount to much, if it's noticeable at all.foreach ( $files ) { workOnFile( "$workdir/$_" ); }
|
|---|