while (<>) { chomp; my @fields = split /\t/; for ( splice(@fields, 3) ) { print(join("\t", @fields, $_), "\n"); } }