system ('source "my_file"') has problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alonkatzir
    New Member
    • Mar 2008
    • 2

    system ('source "my_file"') has problem

    I try to do source action from perl script .the perl scrpit is trying to do :
    system ('source "my_file")
    the file being sourced contains setenv, echo, and alias cmd (a csh file)
    when invoking the perl script it state that "setenv :command not found"
    can anyone expain why it does not work ?
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by alonkatzir
    I try to do source action from perl script .the perl scrpit is trying to do :
    system ('source "my_file")
    the file being sourced contains setenv, echo, and alias cmd (a csh file)
    when invoking the perl script it state that "setenv :command not found"
    can anyone expain why it does not work ?
    When you source this file on the command line, outside of the Perl script, does it work? If not, I would check and see if the setenv command is there.

    Which Unix/Linux are you using and which shell?

    Regards,

    Jeff

    Comment

    • alonkatzir
      New Member
      • Mar 2008
      • 2

      #3
      Originally posted by numberwhun
      When you source this file on the command line, outside of the Perl script, does it work? If not, I would check and see if the setenv command is there.

      Which Unix/Linux are you using and which shell?

      Regards,

      Jeff
      the sorce file works fine when I run it outside of the perl
      I am using csh on linux 32bit
      thx Alon

      Comment

      Working...