Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.

Freelancer

AdvertiseWithUs

Read a tab delimited file and search with perl

  • Public
By Jit 105 days ago
use strict; use warnings; use Data::Dumper; use Text::CSV; use IO::Handle; my $file = "/home/urbe/Tools/Alienomics_v0.1/Alienomics/output/intermediate_files/rRNA/refGene.megablast"; open my $fh, "<", $file or die "$file: $!"; my $csv = Text::CSV->new ({ sep_char=>"\t", binary => 1, # Allow special character. Always set this auto_diag => 1, # Report irregularities immediately }); my $fh = IO::Handle->new_from_fd( $fh, 'r' ); while ( not $fh->eof ) { my $row = $csv->getline( $fh ); print "$row->[0]\n"; warn Dumper $row; # To see the structure }