<?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: Read a tab delimited file and search with perl]]></title>
	<link>https://bioinformaticsonline.com/snippets/view/33451/read-a-tab-delimited-file-and-search-with-perl?</link>
	<atom:link href="https://bioinformaticsonline.com/snippets/view/33451/read-a-tab-delimited-file-and-search-with-perl?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/33451/read-a-tab-delimited-file-and-search-with-perl</guid>
	<pubDate>Tue, 06 Jun 2017 09:18:05 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/33451/read-a-tab-delimited-file-and-search-with-perl</link>
	<title><![CDATA[Read a tab delimited file and search with perl]]></title>
	<description><![CDATA[<code>use strict;
use warnings;
use Data::Dumper;
use Text::CSV;
use IO::Handle;

my $file = &quot;/home/urbe/Tools/Alienomics_v0.1/Alienomics/output/intermediate_files/rRNA/refGene.megablast&quot;;
open my $fh, &quot;&lt;&quot;, $file or die &quot;$file: $!&quot;;
my $csv = Text::CSV-&gt;new ({
      sep_char=&gt;&quot;\t&quot;,
      binary    =&gt; 1, # Allow special character. Always set this
      auto_diag =&gt; 1, # Report irregularities immediately
      });

my $fh = IO::Handle-&gt;new_from_fd( $fh, &#039;r&#039; );

while ( not $fh-&gt;eof ) {
  my $row = $csv-&gt;getline( $fh );
print &quot;$row-&gt;[0]\n&quot;;
  warn Dumper $row; # To see the structure
}</code>]]></description>
	<dc:creator>Jit</dc:creator>
</item>

</channel>
</rss>