I have Perl script and need to determine the full path and filename of the script during execution. I discovered that depending on how you call the script $0 va
On *nix, you likely have the "whereis" command, which searches your $PATH looking for a binary with a given name. If $0 doesn't contain the full path name, running whereis $scriptname and saving the result into a variable should tell you where the script is located.