I am not familiar with mailing lists so I cannot help you much there... Since you are saying the problem does not occur when you run the script from the command line it makes me wonder the script failing because it cannot excecute your command

. Here is a code snippet

#!/usr/bin/perl -w print `date`; print `dfs`; print `date1`;

In the above code, the first line will execute, the second line is referencing my ".alias file" (i guess this is nothing to do with your mailing list alias your are talking about), the third line is an invalid command.

I get the following error as Perl cannot find the commands

Thu Jul 28 00:01:32 CDT 2005 Can't exec "dfs": No such file or directory at sys line 4. Can't exec "date1": No such file or directory at sys line 5.

Is this what you are referring to File or Directory Not Found? Is that the exact error? I am confused because I cannot figure out "what" is "not found" - perl script? or one of the commands inside the perl script? That's why i asked you to put full path for the de command. It could also be that your Perl script cannot be located by your mailing list trigger in which case give it a full path on that alias file

. It will be helpful if you could add some debug statements in your script and say "reached line #: __LINE__" etc. By that you know where it is failing and probably post your code around that if it is too big to post

If the problem is in "executing" the perl script itself then it is probably not perl related and you might want to check our your mailing list app usenet

-SK


In reply to Re^3: Executing system command by sk
in thread Executing system command by perl_devel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.