<?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 - question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559754#M702435</link>
    <description>I take back my last post. Use the system() ones I posted.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
    <pubDate>Wed, 08 Jun 2005 13:41:08 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2005-06-08T13:41:08Z</dc:date>
    <item>
      <title>PERL - question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559746#M702427</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I used the following line in my PERL script to write the errors generated from a system command to a file "log"&lt;BR /&gt;&lt;BR /&gt;system("/bin/cvs checkout -r$bra ivrsrc &amp;gt;&amp;gt;$log") || die "Cannot checkout CVS code from -r$bra";&lt;BR /&gt;&lt;BR /&gt;But the messages from the system command is not written to the log file. It is instead appearing in the screen.&lt;BR /&gt;&lt;BR /&gt;Can anyone please help.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Anand</description>
      <pubDate>Tue, 07 Jun 2005 16:20:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559746#M702427</guid>
      <dc:creator>Anand_30</dc:creator>
      <dc:date>2005-06-07T16:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: PERL - question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559747#M702428</link>
      <description>You need to redirect STDERR too.&lt;BR /&gt; &lt;BR /&gt;system("/bin/cvs checkout -r$bra ivrsrc &amp;gt;&amp;gt;$log 2&amp;gt;&amp;amp;1") &lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Tue, 07 Jun 2005 16:22:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559747#M702428</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-06-07T16:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: PERL - question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559748#M702429</link>
      <description>Hi Rod,&lt;BR /&gt;&lt;BR /&gt;I tried it but does not seem to work. It does not print the messages on the STDERR now but does not write the messages to the log file either.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Anand</description>
      <pubDate>Tue, 07 Jun 2005 16:29:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559748#M702429</guid>
      <dc:creator>Anand_30</dc:creator>
      <dc:date>2005-06-07T16:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: PERL - question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559749#M702430</link>
      <description>Oops,&lt;BR /&gt; &lt;BR /&gt;I forgot the "&amp;amp;" needs to be escaped...&lt;BR /&gt; &lt;BR /&gt;system("/bin/cvs checkout -r$bra ivrsrc &amp;gt;&amp;gt;$log 2&amp;gt;\&amp;amp;1") &lt;BR /&gt; &lt;BR /&gt;(Otherwise perl interprets it as a subroutine call)&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Jun 2005 16:31:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559749#M702430</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-06-07T16:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: PERL - question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559750#M702431</link>
      <description>&lt;BR /&gt;your problem is: CVS outputs the messages on standard error and &amp;gt;&amp;gt; will capture only standard output. To capture standard error you should use 2&amp;gt;.&lt;BR /&gt;&lt;BR /&gt;Try this way:&lt;BR /&gt;&lt;BR /&gt;system("/bin/cvs checkout -r$bra ivrsrc &amp;gt;&amp;gt;$log 2&amp;gt;&amp;gt;$log") || die "Cannot checkout CVS code from -r$bra";&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Gopi</description>
      <pubDate>Wed, 08 Jun 2005 01:27:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559750#M702431</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-06-08T01:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: PERL - question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559751#M702432</link>
      <description>Hi Rod &amp;amp; Gopi,&lt;BR /&gt;&lt;BR /&gt;Thanks for your help. But nothing seems to work.&lt;BR /&gt;&lt;BR /&gt;I am trying it still now. The standard output seems to go to the log file but the standard error is getting displayed in the screen.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Anand</description>
      <pubDate>Wed, 08 Jun 2005 12:46:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559751#M702432</guid>
      <dc:creator>Anand_30</dc:creator>
      <dc:date>2005-06-08T12:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: PERL - question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559752#M702433</link>
      <description>You need to do something other than&lt;BR /&gt;&lt;BR /&gt;system(...) || die ...;&lt;BR /&gt;&lt;BR /&gt;Try something like this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;#&lt;BR /&gt;# this does not die:&lt;BR /&gt;#&lt;BR /&gt;system("echo hi mom &amp;gt;&amp;gt;/tmp/log 2&amp;gt;&amp;amp;1");&lt;BR /&gt;$errcode = $?;&lt;BR /&gt;printf("err code is ${errcode}\n");&lt;BR /&gt;eval ${errcode} == 0 || die "Cannot checkout CVS code from xyz";&lt;BR /&gt;#&lt;BR /&gt;# this DOES die:&lt;BR /&gt;#&lt;BR /&gt;system("NOREALCOMMAND hi mom &amp;gt;&amp;gt;/tmp/log 2&amp;gt;&amp;amp;1");&lt;BR /&gt;$errcode = $?;&lt;BR /&gt;printf("err code is ${errcode}\n");&lt;BR /&gt;eval ${errcode} == 0 || die "Cannot checkout CVS code from xyz";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Wed, 08 Jun 2005 13:24:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559752#M702433</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-06-08T13:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: PERL - question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559753#M702434</link>
      <description>Or better yet:&lt;BR /&gt;&lt;BR /&gt;eval `/bin/cvs checkout -r${bra} ivrsrc &amp;gt;&amp;gt;${log} 2&amp;gt;&amp;amp;1` || die "Cannot checkout CVS code from -r${bra}";&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Wed, 08 Jun 2005 13:29:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559753#M702434</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-06-08T13:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: PERL - question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559754#M702435</link>
      <description>I take back my last post. Use the system() ones I posted.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Wed, 08 Jun 2005 13:41:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/3559754#M702435</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-06-08T13:41:08Z</dc:date>
    </item>
  </channel>
</rss>

