#!/usr/bin/perl use strict; use warnings; use Text::CSV; my $file = $ARGV[0] or die "Usage: $0 "; open(my $fh, '<', $file) or die "Unable to open '$file' for reading: $!"; my $csv = Text::CSV->new({sep_char => "\t", binary => 1}); $csv->column_names($csv->getline($fh)); while (my $hr = $csv->getline_hr($fh)) { print "Amino acid is: $hr->{SEQ} and Prediction is: $hr->{PRD}\n"; }