in reply to Re^3: Loop is not working
in thread Loop is not working
I completely agree that absolute pathnames and writing scripts to be independent of the current working directory is a good thing. In addition to error checking, I'd also recommend using a module to make operations on filenames platform independent (File::Spec, Path::Class, Path::Tiny, etc.).
Unfortunately, external programs aren't always written like that, and may depend on the current working directory (just one example of many would be git). In those cases, I like to use File::pushd to make changes to the current working directory temporary.
|
|---|