#!/usr/bin/perl $_ = ; $tab = 4; 1 while s/\t+/' ' x (length ($&) * $tab - length ($`) % $tab) /e; print;