<?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 understanding the perl one line in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/understanding-the-perl-one-line/m-p/5006646#M34897</link>
    <description>Hi,&lt;BR /&gt;in this forum in the thread &lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1065208" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1065208&lt;/A&gt;&lt;BR /&gt;i have seen the solution for the question as &lt;BR /&gt;#perl -ne '($h,$n)=split; if ($old=$o{$h}) {print "$h : ", $n - $old, "\n"} else {$o{$h}=$n}' file1.txt file2.txt&lt;BR /&gt;in the if statement iam seeing that the value $o{$h}is being assigned to $old,in the if condition there is no condition as i was expecting i.e like == ,&amp;gt;,&amp;lt; but the result is coming out as expected can please someone help in understanding this &lt;BR /&gt;Thanks in advance &lt;BR /&gt;</description>
    <pubDate>Tue, 03 Oct 2006 21:38:59 GMT</pubDate>
    <dc:creator>Abdul khadeer_1</dc:creator>
    <dc:date>2006-10-03T21:38:59Z</dc:date>
    <item>
      <title>understanding the perl one line</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/understanding-the-perl-one-line/m-p/5006646#M34897</link>
      <description>Hi,&lt;BR /&gt;in this forum in the thread &lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1065208" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1065208&lt;/A&gt;&lt;BR /&gt;i have seen the solution for the question as &lt;BR /&gt;#perl -ne '($h,$n)=split; if ($old=$o{$h}) {print "$h : ", $n - $old, "\n"} else {$o{$h}=$n}' file1.txt file2.txt&lt;BR /&gt;in the if statement iam seeing that the value $o{$h}is being assigned to $old,in the if condition there is no condition as i was expecting i.e like == ,&amp;gt;,&amp;lt; but the result is coming out as expected can please someone help in understanding this &lt;BR /&gt;Thanks in advance &lt;BR /&gt;</description>
      <pubDate>Tue, 03 Oct 2006 21:38:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/understanding-the-perl-one-line/m-p/5006646#M34897</guid>
      <dc:creator>Abdul khadeer_1</dc:creator>
      <dc:date>2006-10-03T21:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: understanding the perl one line</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/understanding-the-perl-one-line/m-p/5006647#M34898</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;if ($variable)&lt;BR /&gt;&lt;BR /&gt;Is true if $variable is defined and not 0.&lt;BR /&gt;&lt;BR /&gt;if ($variable=$other)&lt;BR /&gt;&lt;BR /&gt;First assigns $other to $variable and test the result for true or false.&lt;BR /&gt;So it really tests $other, while at the same time picking up its value.&lt;BR /&gt;&lt;BR /&gt;It could be written as:&lt;BR /&gt;&lt;BR /&gt;if ($other) {&lt;BR /&gt;  $variable = $other;&lt;BR /&gt;  ...&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Oct 2006 22:23:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/understanding-the-perl-one-line/m-p/5006647#M34898</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-10-03T22:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: understanding the perl one line</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/understanding-the-perl-one-line/m-p/5006648#M34899</link>
      <description>($h,$n)=split is going to split the file i.e host1-80 10&lt;BR /&gt;    host2-80 15   according the space .&lt;BR /&gt;how is %o association being formed in this case i believe that is what you are refering by saying the $o{$h} . After the condition is true you are trying to substract $n[0]..that would be 10 or 15 and you are refering the $o{$h} is the same value if the association is being formed from spilt.&lt;BR /&gt;  Thanks for your help in advance</description>
      <pubDate>Tue, 03 Oct 2006 22:45:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/understanding-the-perl-one-line/m-p/5006648#M34899</guid>
      <dc:creator>Abdul khadeer_1</dc:creator>
      <dc:date>2006-10-03T22:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: understanding the perl one line</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/understanding-the-perl-one-line/m-p/5006649#M34900</link>
      <description>thanks  for explaining the how the if works .but that raised one more question i will post in a new thread</description>
      <pubDate>Wed, 04 Oct 2006 09:00:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/understanding-the-perl-one-line/m-p/5006649#M34900</guid>
      <dc:creator>Abdul khadeer_1</dc:creator>
      <dc:date>2006-10-04T09:00:41Z</dc:date>
    </item>
  </channel>
</rss>

