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.
In reply to Re^4: Loop is not working
by haukex
in thread Loop is not working
by ozdemmer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |