my $tab = 8; while () { chomp; my @fields = split(/\t/, $_); my $cooked = shift (@fields) . join '', sprintf("-$tab%s", @fields); print $cooked, "\n"; } #### my $tab = 8; s/\t/" " x $tab/ego;