#!perl -lawn $f = shift @F; $i = 1; print join "\t", $., $f, $i++, shift @F, shift @F while @F;