#!/usr/bin/perl while () { next if (/^#/ or /^\s*$/); chomp; @t = split /\t/; # your code goes here } __DATA__ # your data goes here