<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl/CGI running external commands in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660928#M102633</link>
    <description>The system call to remove the files can be done with the unlink() function directly from Perl.&lt;BR /&gt;&lt;BR /&gt;That is tis only system call I can see - Am I missing something?</description>
    <pubDate>Mon, 07 Nov 2005 05:32:23 GMT</pubDate>
    <dc:creator>Daavid Turnbull</dc:creator>
    <dc:date>2005-11-07T05:32:23Z</dc:date>
    <item>
      <title>Perl/CGI running external commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660920#M102625</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;I am using Perl for extracting and parsing data from my server. I habe a *.cgi, which runs those lines when called:&lt;BR /&gt;&lt;BR /&gt;system ("/usr/bin/perl /opt/webmin-1.230/vimod/load/testreverse.pl");&lt;BR /&gt;&lt;BR /&gt;system ("/usr/local/bin/pl -png /opt/webmin-1.230/vimod/load/$script_name");&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;&lt;BR /&gt;The first call doesn't work and I wonder why? The Perl-Script has W,R,X-Rights. If I call it from the shell, there is no problem.&lt;BR /&gt;&lt;BR /&gt;The second is running correctly. &lt;BR /&gt;Can anybody help?&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Oct 2005 06:39:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660920#M102625</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-10-31T06:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Perl/CGI running external commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660921#M102626</link>
      <description>How do you run it from the command line? Are you sure your perl binary is under /usr/bin&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Oct 2005 06:49:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660921#M102626</guid>
      <dc:creator>Orhan Biyiklioglu</dc:creator>
      <dc:date>2005-10-31T06:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Perl/CGI running external commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660922#M102627</link>
      <description>I call ot with:&lt;BR /&gt;&lt;BR /&gt;$/dir/script&amp;gt;perl tralala.pl&lt;BR /&gt;&lt;BR /&gt;Perl is in /opt/perl5/bin, but when I changed it it didn't work again.</description>
      <pubDate>Mon, 31 Oct 2005 07:02:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660922#M102627</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-10-31T07:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Perl/CGI running external commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660923#M102628</link>
      <description>Tried "-w" for perl to see what it complains if at all? I'd also try to separate command and agrument, like "perl" "...".system() does fork I think and calls a shell so it may be some shell thing that doesn't work.See this one also:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.perl.com/doc/FAQs/cgi/idiots-guide.html" target="_blank"&gt;http://www.perl.com/doc/FAQs/cgi/idiots-guide.html&lt;/A&gt;</description>
      <pubDate>Mon, 31 Oct 2005 08:13:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660923#M102628</guid>
      <dc:creator>Zeev Schultz</dc:creator>
      <dc:date>2005-10-31T08:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Perl/CGI running external commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660924#M102629</link>
      <description>Out of curiostiy what is the CGI language are you using?  (I am thinking that you might be better off writing the whole think in perl.)&lt;BR /&gt;&lt;BR /&gt;Presuming you have as the first line of your script:&lt;BR /&gt;&lt;BR /&gt;#! /usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;why would you not run:&lt;BR /&gt;&lt;BR /&gt;system("/opt/webmin-1.230/vimod/load/testreverse.pl");&lt;BR /&gt;&lt;BR /&gt;??</description>
      <pubDate>Tue, 01 Nov 2005 20:42:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660924#M102629</guid>
      <dc:creator>Daavid Turnbull</dc:creator>
      <dc:date>2005-11-01T20:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Perl/CGI running external commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660925#M102630</link>
      <description>It is perl..&lt;BR /&gt;There should not be any difference..anyway I may try this.</description>
      <pubDate>Mon, 07 Nov 2005 03:09:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660925#M102630</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-11-07T03:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Perl/CGI running external commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660926#M102631</link>
      <description>You have to check with perl binary location. If it is in PATH Variable then you may not need to give full path.&lt;BR /&gt;&lt;BR /&gt;Get perl path as,&lt;BR /&gt;&lt;BR /&gt;$PERL=`which perl`&lt;BR /&gt;system("$PERL &amp;lt;script&amp;gt;");&lt;BR /&gt;&lt;BR /&gt;It will work.&lt;BR /&gt;&lt;BR /&gt;~regards&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Nov 2005 03:22:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660926#M102631</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-11-07T03:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Perl/CGI running external commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660927#M102632</link>
      <description>Sorry, but it doesn't work. Perl is behaving really strange on this machine. Commeing a line in the source changes the script behaviour completly..It is the system-call in the attachment. The script should create 4 files. There is a system call deleting all old files, before creating the new ones. When this line is not commented, the script creates only one file. If I remove the line, it creats 4 files, as it must be..&lt;BR /&gt;All this means, that I don't know where am I stuck- perl programming or system administration :(</description>
      <pubDate>Mon, 07 Nov 2005 03:43:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660927#M102632</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-11-07T03:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Perl/CGI running external commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660928#M102633</link>
      <description>The system call to remove the files can be done with the unlink() function directly from Perl.&lt;BR /&gt;&lt;BR /&gt;That is tis only system call I can see - Am I missing something?</description>
      <pubDate>Mon, 07 Nov 2005 05:32:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660928#M102633</guid>
      <dc:creator>Daavid Turnbull</dc:creator>
      <dc:date>2005-11-07T05:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Perl/CGI running external commands</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660929#M102634</link>
      <description>It is your scripting problem :)&lt;BR /&gt;&lt;BR /&gt;sub create_data_files {&lt;BR /&gt;&lt;BR /&gt;system ("rm -f /opt/webmin-1.230/vimod/load/*.tmp");&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&amp;amp;create_data_files("hour");&lt;BR /&gt;&amp;amp;create_data_files("day");&lt;BR /&gt;&amp;amp;create_data_files("week");&lt;BR /&gt;&amp;amp;create_data_files("month");&lt;BR /&gt;&lt;BR /&gt;Every execution will delete all .tmp files. It will keep only "month" file only at last. Do you want to delete all old files?&lt;BR /&gt;&lt;BR /&gt;Remove system ("rm -f /opt/webmin-1.230/vimod/load/*.tmp"); from sub create_data_files and put it infront of,&lt;BR /&gt;&lt;BR /&gt;system ("rm -f /opt/webmin-1.230/vimod/load/*.tmp");&lt;BR /&gt;&amp;amp;create_data_files("hour");&lt;BR /&gt;&amp;amp;create_data_files("day");&lt;BR /&gt;&amp;amp;create_data_files("week");&lt;BR /&gt;&amp;amp;create_data_files("month");&lt;BR /&gt;&lt;BR /&gt;It will work now. Refer attachment for fresh.&lt;BR /&gt;&lt;BR /&gt;~regards&lt;BR /&gt;&lt;BR /&gt;&lt;/SNIP&gt;</description>
      <pubDate>Mon, 07 Nov 2005 05:48:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-cgi-running-external-commands/m-p/3660929#M102634</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-11-07T05:48:48Z</dc:date>
    </item>
  </channel>
</rss>

