<?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/4274022#M688382</link>
    <description>Beware of the possible performance hit of File::Handle when using the verbose HANDLE-&amp;gt;autoflush (1) instead of the terse $|++. The performance hit isn't that big, but people like me think: why load a 600+ line module for such a simple operation.&lt;BR /&gt;&lt;BR /&gt;On modern systems you won't notice, but hardcore perl programmers will use the cryptic but very fast way of unbuffering a filehandle like this:&lt;BR /&gt;&lt;BR /&gt;select ((select (HANDLE), $| = 1)[0]);&lt;BR /&gt;&lt;BR /&gt;which switches to HANDLE, sets unbuffered, and switches back to the current handle.&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
    <pubDate>Tue, 23 Sep 2008 11:22:59 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2008-09-23T11:22:59Z</dc:date>
    <item>
      <title>Perl Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/4274018#M688378</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Please let me know what does this syntax "$|++" mean in perl?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Sep 2008 02:09:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/4274018#M688378</guid>
      <dc:creator>Sutapa Dey</dc:creator>
      <dc:date>2008-09-23T02:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/4274019#M688379</link>
      <description>Short answer:&lt;BR /&gt;&lt;BR /&gt;Unbuffered output on the current file handle&lt;BR /&gt;&lt;BR /&gt;Longer answer:&lt;BR /&gt;&lt;BR /&gt;$ man perlvar&lt;BR /&gt;:&lt;BR /&gt;       HANDLE-&amp;gt;autoflush(EXPR)&lt;BR /&gt;       $OUTPUT_AUTOFLUSH&lt;BR /&gt;       $|      If set to nonzero, forces a flush right away and after every&lt;BR /&gt;               write or print on the currently selected output channel.&lt;BR /&gt;               Default is 0 (regardless of whether the channel is really&lt;BR /&gt;               buffered by the system or not; $| tells you only whether you've&lt;BR /&gt;               asked Perl explicitly to flush after each write).  STDOUT will&lt;BR /&gt;               typically be line buffered if output is to the terminal and&lt;BR /&gt;               block buffered otherwise.  Setting this variable is useful&lt;BR /&gt;               primarily when you are outputting to a pipe or socket, such as&lt;BR /&gt;               when you are running a Perl program under rsh and want to see&lt;BR /&gt;               the output as it's happening.  This has no effect on input&lt;BR /&gt;               buffering.  See "getc" in perlfunc for that.  See "select" in&lt;BR /&gt;               perldoc on how to select the output channel.  See also&lt;BR /&gt;               IO::Handle. (Mnemonic: when you want your pipes to be piping&lt;BR /&gt;               hot.)&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 23 Sep 2008 07:27:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/4274019#M688379</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2008-09-23T07:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/4274020#M688380</link>
      <description>Hi Sutapa:&lt;BR /&gt;&lt;BR /&gt;To add, the post-increment applied to the '$|' variable is a very common Perl idiom used to set the autoflush variable on.&lt;BR /&gt;&lt;BR /&gt;You could also simply do, and some folks consider this "better":&lt;BR /&gt;&lt;BR /&gt;$| = 1;&lt;BR /&gt;&lt;BR /&gt;You might find this discussion interesting:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.perlmonks.org/?node_id=280025" target="_blank"&gt;http://www.perlmonks.org/?node_id=280025&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Sep 2008 10:46:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/4274020#M688380</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-09-23T10:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/4274021#M688381</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;One last comment:  You might also profit by reading this:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums12.itrc.hp.com/service/forums/helptips.do?#28" target="_blank"&gt;http://forums12.itrc.hp.com/service/forums/helptips.do?#28&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 23 Sep 2008 10:48:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/4274021#M688381</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-09-23T10:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/4274022#M688382</link>
      <description>Beware of the possible performance hit of File::Handle when using the verbose HANDLE-&amp;gt;autoflush (1) instead of the terse $|++. The performance hit isn't that big, but people like me think: why load a 600+ line module for such a simple operation.&lt;BR /&gt;&lt;BR /&gt;On modern systems you won't notice, but hardcore perl programmers will use the cryptic but very fast way of unbuffering a filehandle like this:&lt;BR /&gt;&lt;BR /&gt;select ((select (HANDLE), $| = 1)[0]);&lt;BR /&gt;&lt;BR /&gt;which switches to HANDLE, sets unbuffered, and switches back to the current handle.&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 23 Sep 2008 11:22:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-question/m-p/4274022#M688382</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2008-09-23T11:22:59Z</dc:date>
    </item>
  </channel>
</rss>

