By using the shebang #!/usr/bin/perl your example commands fail if a user is using a conda env (or non-systemwide environment) to manage their perl. By replacing with #!/usr/bin/env -S perl -w , invoking the scripts will work regardless of the location of the user's perl install.