# Running perl script on remote host as applcation user

**URL:** <https://forum.ansible.com/t/running-perl-script-on-remote-host-as-applcation-user/32337>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [February 26, 2020, 9:28pm UTC](https://forum.ansible.com/t/running-perl-script-on-remote-host-as-applcation-user/32337 "2020-02-26T21:28:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [February 26, 2020, 9:28pm UTC](https://forum.ansible.com/t/running-perl-script-on-remote-host-as-applcation-user/32337/1 "2020-02-26T21:28:32Z")

</div>

It's probably because your script /sgi/atx/src/atxBoxHWM.pl need some  
environment variables set.

When you login and manually execute the command you are using a interactive  
shell, when Ansible(or you) execute the command from remote you are using  
non-interactive shell.  
These two modes read different files so you environment is probably not  
correct.

To read more about interactive and non-interactive shell search search for it  
on the web or in this list. Ansible use "/bin/sh", but in the "man bash" search  
for INVOCATION to read a more thorough explanation about the two.
