<?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 problem -- endless loop only with web in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163379#M718084</link>
    <description>Are you using mod-perl, by any chance?&lt;BR /&gt;In that case, execution of external programs is not always supported.&lt;BR /&gt;&lt;BR /&gt;Best way, anyway, is to keep as much as possible in one executable. In your case, a simple solution would have been to not call your script using system, but to put the stuff you need to do in a function and call that function on the line you now have the system call...&lt;BR /&gt;</description>
    <pubDate>Wed, 14 Jan 2004 02:43:28 GMT</pubDate>
    <dc:creator>Elmar P. Kolkman</dc:creator>
    <dc:date>2004-01-14T02:43:28Z</dc:date>
    <item>
      <title>perl problem -- endless loop only with web</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163375#M718080</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;My perl app makes a file based on a date that is passed in.  If two dates are passed in, it'll make several files one for each date in the range by running thru the code for the first date and then calling itself in a loop with each subsequent date.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  if ($doMultiple) {&lt;BR /&gt;    foreach $dates (@dates) {&lt;BR /&gt;      system "/path2apps/myAppName $dates";&lt;BR /&gt;    }&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;When I run my app on the command line, it makes all the files and exits.&lt;BR /&gt;&lt;BR /&gt;When I run the app from the web, it goes into an endless loop.  I added some debug statements to check the dates in my dates array and they are what is expected -- one date for each day in the range.&lt;BR /&gt;&lt;BR /&gt;Can anyone offer help?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;TIA,&lt;BR /&gt;Anna</description>
      <pubDate>Tue, 13 Jan 2004 14:19:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163375#M718080</guid>
      <dc:creator>Anna Fong</dc:creator>
      <dc:date>2004-01-13T14:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: perl problem -- endless loop only with web</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163376#M718081</link>
      <description>The main factors that might prevent an application from running in a non-interactive environment are-&lt;BR /&gt; &lt;BR /&gt;1) What is the current directory&lt;BR /&gt;2) Who is the user the app is running as&lt;BR /&gt;3) What the value of PATH is&lt;BR /&gt;4) If STDIN/STDOUT/STDERR are set to a terminal&lt;BR /&gt; &lt;BR /&gt;An interactive session will have these critical items setup (via .profile).&lt;BR /&gt; &lt;BR /&gt;Do you know where in the script it is looping?&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Tue, 13 Jan 2004 15:11:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163376#M718081</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-01-13T15:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: perl problem -- endless loop only with web</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163377#M718082</link>
      <description>Sounds like an environment issue.&lt;BR /&gt;&lt;BR /&gt;I'm attaching perl script that displays environment at perl run time.&lt;BR /&gt;&lt;BR /&gt;It might help you out.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 13 Jan 2004 15:22:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163377#M718082</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-01-13T15:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: perl problem -- endless loop only with web</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163378#M718083</link>
      <description>I solved my problem by changing the logic of the app.  Rather than running thru the code for the first date and then calling itself with each subsequent date in a loop, I changed it to loop thru the code for each date in the range.&lt;BR /&gt;&lt;BR /&gt;I still don't know why it worked in its previous form on the command line and not via the web, other than perhaps it has something to do with how CGI works.&lt;BR /&gt;&lt;BR /&gt;Anna&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Jan 2004 15:44:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163378#M718083</guid>
      <dc:creator>Anna Fong</dc:creator>
      <dc:date>2004-01-13T15:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: perl problem -- endless loop only with web</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163379#M718084</link>
      <description>Are you using mod-perl, by any chance?&lt;BR /&gt;In that case, execution of external programs is not always supported.&lt;BR /&gt;&lt;BR /&gt;Best way, anyway, is to keep as much as possible in one executable. In your case, a simple solution would have been to not call your script using system, but to put the stuff you need to do in a function and call that function on the line you now have the system call...&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Jan 2004 02:43:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-problem-endless-loop-only-with-web/m-p/3163379#M718084</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2004-01-14T02:43:28Z</dc:date>
    </item>
  </channel>
</rss>

