<?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 using &amp;lt;STDIN&amp;gt; in PERL in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507048#M31916</link>
    <description>I have a PERL routine which takes input from &lt;STDIN&gt;.  Run standalone...eg "PERL &lt;PROG&gt; &lt;PARAMETER&gt; works fine.&lt;BR /&gt;&lt;BR /&gt;However, I need to call the PERL routine from a DCL procedure...in this situation &lt;STDIN&gt; doesn't take input from the keyboard....how can I define SYS$INPUT/SYS$COMMAND so that STDIN will work in this circumstance?&lt;/STDIN&gt;&lt;/PARAMETER&gt;&lt;/PROG&gt;&lt;/STDIN&gt;</description>
    <pubDate>Thu, 17 Mar 2005 12:35:49 GMT</pubDate>
    <dc:creator>Barry McClintock</dc:creator>
    <dc:date>2005-03-17T12:35:49Z</dc:date>
    <item>
      <title>using &lt;STDIN&gt; in PERL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507048#M31916</link>
      <description>I have a PERL routine which takes input from &lt;STDIN&gt;.  Run standalone...eg "PERL &lt;PROG&gt; &lt;PARAMETER&gt; works fine.&lt;BR /&gt;&lt;BR /&gt;However, I need to call the PERL routine from a DCL procedure...in this situation &lt;STDIN&gt; doesn't take input from the keyboard....how can I define SYS$INPUT/SYS$COMMAND so that STDIN will work in this circumstance?&lt;/STDIN&gt;&lt;/PARAMETER&gt;&lt;/PROG&gt;&lt;/STDIN&gt;</description>
      <pubDate>Thu, 17 Mar 2005 12:35:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507048#M31916</guid>
      <dc:creator>Barry McClintock</dc:creator>
      <dc:date>2005-03-17T12:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: using &lt;STDIN&gt; in PERL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507049#M31917</link>
      <description>&lt;BR /&gt;Hmmm, works fine for me by doing nothing special.&lt;BR /&gt;For example a file tmp.com containing:&lt;BR /&gt;&lt;BR /&gt;$ create tmp.pl&lt;BR /&gt;$deck&lt;BR /&gt;$param=shift @ARGV;&lt;BR /&gt;while (&lt;STDIN&gt;) {&lt;BR /&gt;  print "hello : $param : ".$_;&lt;BR /&gt;  }&lt;BR /&gt;$eod&lt;BR /&gt;$ perl tmp.pl xyz&lt;BR /&gt;aap&lt;BR /&gt;noot&lt;BR /&gt;mies&lt;BR /&gt;$delete tmp.pl.&lt;BR /&gt;$exit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ @tmp&lt;BR /&gt;hello : xyz : aap&lt;BR /&gt;hello : xyz : noot&lt;BR /&gt;hello : xyz : mies&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now if you wanted the input to come from the terminal that started the command file, then you have to tell DCL that with:&lt;BR /&gt;$define/user sys$input sys$command&lt;BR /&gt;&lt;BR /&gt;This is NOT speecific to perl, but standard practice for any DCL command file.&lt;BR /&gt;The whole solution then becomes:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ type tmp.com&lt;BR /&gt;$ create tmp.pl&lt;BR /&gt;$deck&lt;BR /&gt;$param=shift @ARGV;&lt;BR /&gt;while (&lt;STDIN&gt;) {&lt;BR /&gt;  print "hello : $param : ".$_;&lt;BR /&gt;  }&lt;BR /&gt;$eod&lt;BR /&gt;$define/user sys$input sys$command&lt;BR /&gt;$perl tmp.pl xyz&lt;BR /&gt;$delete tmp.pl.&lt;BR /&gt;$exit&lt;BR /&gt;&lt;BR /&gt;And runs as:&lt;BR /&gt;&lt;BR /&gt;$ @tmp&lt;BR /&gt;aap&lt;BR /&gt;hello : xyz : aap&lt;BR /&gt;noot&lt;BR /&gt;hello : xyz : noot&lt;BR /&gt;mies&lt;BR /&gt;hello : xyz : mies&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;/STDIN&gt;&lt;/STDIN&gt;</description>
      <pubDate>Thu, 17 Mar 2005 13:11:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507049#M31917</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-03-17T13:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: using &lt;STDIN&gt; in PERL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507050#M31918</link>
      <description>Barry,&lt;BR /&gt;&lt;BR /&gt;Already tried &lt;BR /&gt;&lt;BR /&gt;$ DEFINE SYS$INPUT SYS$COMMAND&lt;BR /&gt;?&lt;BR /&gt;&lt;BR /&gt;Just meaning, equate the SYS$INPUT  (which I guess would be called stdin in the *IXian parlance used by perl) to SYS$COMMAND (the master command level; in interactive sessions equated to the keyboard).&lt;BR /&gt;&lt;BR /&gt;For single-image activities this can be defined /USER_MODE ; if not, then do not forget to DEASSIGN !!&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;Jan</description>
      <pubDate>Thu, 17 Mar 2005 13:13:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507050#M31918</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2005-03-17T13:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: using &lt;STDIN&gt; in PERL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507051#M31919</link>
      <description>Barry,&lt;BR /&gt;&lt;BR /&gt;obviously you were helped well in your question about C header files.&lt;BR /&gt;&lt;BR /&gt;Maybe you should take the time to thank those who helped by assigning some points.&lt;BR /&gt;&lt;BR /&gt;For the "WHY?" and "HOW?", please see:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#28" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#28&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;PS. you will have to re-open the thread before you can give points. Afterwards you can close it again.&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;Jan</description>
      <pubDate>Thu, 17 Mar 2005 13:23:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507051#M31919</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2005-03-17T13:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: using &lt;STDIN&gt; in PERL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507052#M31920</link>
      <description>thanks again...I had gotten this but greatly appreciate your prompt reply.&lt;BR /&gt;&lt;BR /&gt;Barry</description>
      <pubDate>Thu, 17 Mar 2005 15:30:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-lt-stdin-gt-in-perl/m-p/3507052#M31920</guid>
      <dc:creator>Barry McClintock</dc:creator>
      <dc:date>2005-03-17T15:30:57Z</dc:date>
    </item>
  </channel>
</rss>

