<?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 PERL script needed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597345#M829010</link>
    <description>In a Data file with delimiter ‘|’&lt;BR /&gt;i need to know the unique store key with number of items for it.&lt;BR /&gt;&lt;BR /&gt;for example .&lt;BR /&gt;121882|18281684|100|250416|2&lt;BR /&gt;121882|18281684|100|250416|30&lt;BR /&gt;&lt;BR /&gt;$3=store key ; $5=items&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;unique store key 100 with 32 items</description>
    <pubDate>Fri, 05 Aug 2005 05:59:44 GMT</pubDate>
    <dc:creator>kiran1977</dc:creator>
    <dc:date>2005-08-05T05:59:44Z</dc:date>
    <item>
      <title>PERL script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597345#M829010</link>
      <description>In a Data file with delimiter ‘|’&lt;BR /&gt;i need to know the unique store key with number of items for it.&lt;BR /&gt;&lt;BR /&gt;for example .&lt;BR /&gt;121882|18281684|100|250416|2&lt;BR /&gt;121882|18281684|100|250416|30&lt;BR /&gt;&lt;BR /&gt;$3=store key ; $5=items&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;unique store key 100 with 32 items</description>
      <pubDate>Fri, 05 Aug 2005 05:59:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597345#M829010</guid>
      <dc:creator>kiran1977</dc:creator>
      <dc:date>2005-08-05T05:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: PERL script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597346#M829011</link>
      <description>$_ = "121882|18281684|100|250416|2";&lt;BR /&gt;my ($key, $items) = (split /\s*\|\s*/)[2,4];&lt;BR /&gt;&lt;BR /&gt;or inside the loop:&lt;BR /&gt;&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt; chomp;&lt;BR /&gt; my ($key, $items) = (split /\s*\|\s*/)[2,4];&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Fri, 05 Aug 2005 06:03:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597346#M829011</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-08-05T06:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: PERL script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597347#M829012</link>
      <description>am using this script&lt;BR /&gt;&lt;BR /&gt;open (INP,"testcpn1.txt");&lt;BR /&gt;while($x=&lt;INP&gt;){&lt;BR /&gt;chomp($x);&lt;BR /&gt;my($key,$items)=split(/\s*\|\s*/)[2,4];&lt;BR /&gt;@count[$key]+=$items;&lt;BR /&gt;}&lt;BR /&gt;close (INP);&lt;BR /&gt;foreach $i (@count)&lt;BR /&gt;{&lt;BR /&gt;print  $i."|".$count[$i];&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;am getting out put as 0|0&lt;BR /&gt;&lt;BR /&gt;please can you look at this and give me the proper way. &lt;BR /&gt;&lt;BR /&gt;Thanks in Advance.&lt;BR /&gt;&lt;BR /&gt;&lt;/INP&gt;</description>
      <pubDate>Fri, 05 Aug 2005 07:09:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597347#M829012</guid>
      <dc:creator>kiran1977</dc:creator>
      <dc:date>2005-08-05T07:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: PERL script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597348#M829013</link>
      <description>my %count;&lt;BR /&gt;open INP, "&lt;TESTCPN1.TXT&gt;&lt;/TESTCPN1.TXT&gt;while (&lt;INP&gt;) {&lt;BR /&gt;chomp;&lt;BR /&gt;my ($key, $items) = (split /\s*\|\s*/)[2,4];&lt;BR /&gt;$count{$key} += $items;&lt;BR /&gt;}&lt;BR /&gt;close INP;&lt;BR /&gt;foreach my $i (sort keys %count) {&lt;BR /&gt;print "$i|$count{$i}\n";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn&lt;/INP&gt;</description>
      <pubDate>Fri, 05 Aug 2005 07:47:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597348#M829013</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-08-05T07:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: PERL script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597349#M829014</link>
      <description>its is working fine.&lt;BR /&gt;Thanks a lot.&lt;BR /&gt;please here are some of the other queries&lt;BR /&gt;1. i need to find out the count of number of unique stores in it.&lt;BR /&gt;&lt;BR /&gt;2. i have a date field(fourth field ($4)) in my file with format 2005-01-23 00:00:00. from this i want to extract the hourth value.how can i do it with perl.&lt;BR /&gt;in awk i have written it succesfully &lt;BR /&gt;BEGIN{&lt;BR /&gt;        FS=OFS="|"&lt;BR /&gt;        }&lt;BR /&gt;        {&lt;BR /&gt;          dat=split($4,aa," ") // &lt;BR /&gt;          hour=split(aa[2],bb,":")&lt;BR /&gt;          count[bb[1]]++&lt;BR /&gt;        }&lt;BR /&gt;        END{&lt;BR /&gt;        for(i in count)&lt;BR /&gt;        {&lt;BR /&gt;        print "Hour", i,"th number of transactions happened =   " count[i];&lt;BR /&gt;        }&lt;BR /&gt;        }   &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;please can u write this script in perl.&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance. &lt;BR /&gt;&lt;BR /&gt;i need to convert all of my awk excercise in to perl.&lt;BR /&gt;because awk behaves erratically for numbers beyond 4294967296 (2^32)&lt;BR /&gt;&lt;BR /&gt;Please do the need.&lt;BR /&gt;&lt;BR /&gt;Great Thanks &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Aug 2005 09:01:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597349#M829014</guid>
      <dc:creator>kiran1977</dc:creator>
      <dc:date>2005-08-05T09:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: PERL script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597350#M829015</link>
      <description>&amp;gt; its is working fine.&lt;BR /&gt;&lt;BR /&gt;Good.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Thanks a lot.&lt;BR /&gt;&lt;BR /&gt;Thank can be expressed in assigning points&lt;BR /&gt;&lt;BR /&gt;&amp;gt; please here are some of the other queries&lt;BR /&gt;&amp;gt; 1. i need to find out the count of number of unique stores in it.&lt;BR /&gt;&lt;BR /&gt;print scalar keys %count;&lt;BR /&gt;&lt;BR /&gt;&amp;gt; 2. i have a date field(fourth field ($4)) in my file with format 2005-01-23 00:00:00.&lt;BR /&gt;&amp;gt; from this i want to extract the hourth value.how can i do it with perl.&lt;BR /&gt;&lt;BR /&gt;my $hour = ($date_fld =~ m/\s+(\d+)/);&lt;BR /&gt;&lt;BR /&gt;&amp;gt; in awk i have written it succesfully &lt;BR /&gt;&lt;BR /&gt;awk is not my specialty. I consider awk a dead language, only useful for very easy tasks&lt;BR /&gt;&lt;BR /&gt;&amp;gt; i need to convert all of my awk excercise in to perl.&lt;BR /&gt;&lt;BR /&gt;# a2p &amp;lt;script.awk &amp;gt; script.pl&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Fri, 05 Aug 2005 09:08:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597350#M829015</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-08-05T09:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: PERL script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597351#M829016</link>
      <description>Sorry, two parenteses missing:&lt;BR /&gt;&lt;BR /&gt;my ($hour) = ($date_fld =~ m/\s+(\d+)/);&lt;BR /&gt;&lt;BR /&gt;FWIW, you could also consider using Date::Calc&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Fri, 05 Aug 2005 09:27:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597351#M829016</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-08-05T09:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: PERL script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597352#M829017</link>
      <description>for unique stores script.the number of unique stores in itd isplays as 2. in the data file there is only one store 100.</description>
      <pubDate>Sat, 06 Aug 2005 01:03:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-needed/m-p/3597352#M829017</guid>
      <dc:creator>kiran1977</dc:creator>
      <dc:date>2005-08-06T01:03:48Z</dc:date>
    </item>
  </channel>
</rss>

