How to execute(call) .sh file from the perl file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Paresh Mahajan
    New Member
    • May 2007
    • 1

    How to execute(call) .sh file from the perl file

    Hi All,

    I need to call (run/execute) sample.sh file from the windows perl file.

    I know in linux it can be called as `sample.sh`;
    but that is not working in window XP.

    Here my Sample.sh is setting environment variables such as JAVA_HOME, PATH, CLASPATH etc.

    As "sample.sh" is not executed within the perl file, all paths are getting messed up.

    I also tried to use system and exec, but in vein.

    Is there any other way for the same.



    Thanks in advance.

    Regards,
    Paresh.
  • miller
    Recognized Expert Top Contributor
    • Oct 2006
    • 1086

    #2
    Read this thread from yesterday:

    how to invoke/run a shell file sample.sh from within perl file.

    - Miller

    Comment

    Working...