<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Perl script to count occurrence of a character !]]></title>
	<link>https://bioinformaticsonline.com/snippets/view/39023/perl-script-to-count-occurrence-of-a-character?</link>
	<atom:link href="https://bioinformaticsonline.com/snippets/view/39023/perl-script-to-count-occurrence-of-a-character?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/39023/perl-script-to-count-occurrence-of-a-character</guid>
	<pubDate>Wed, 20 Feb 2019 20:03:55 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/39023/perl-script-to-count-occurrence-of-a-character</link>
	<title><![CDATA[Perl script to count occurrence of a character !]]></title>
	<description><![CDATA[<code>#!/usr/bin/env perl
# -*- coding: utf-8 -*-

#!/usr/bin/perl

use strict; 
use warnings;

my %count_of;

while ( &lt;&gt; ) {
   my @val = split &quot;\t&quot;, $_;
   #my ( $word) = m/(\w+)/;
   $count_of{$val[13]}++;
}

foreach my $word ( sort { $count_of{$a} &lt;=&gt; $count_of{$b} } keys %count_of ) {
    print &quot;$word\t$count_of{$word}\n&quot;;
}</code>]]></description>
	<dc:creator>Jit</dc:creator>
</item>

</channel>
</rss>