fork(3) download
  1. my $g_tab_width = 4;
  2.  
  3. my $s1 = "Where\tis pancakes house?";
  4. $s1 =~ s{(.*?)\t}{$1.(' ' x ($g_tab_width - length($1) % $g_tab_width))}ge;
  5.  
  6. my $s2 = "Where\tis pancakes house?";
  7. $s2 =~ s/(.*?)\t/$1 /g;
  8.  
  9. print $s1, "\n", $s2, "\n";
  10.  
Success #stdin #stdout 0s 4596KB
stdin
Standard input is empty
stdout
Where   is pancakes house?
Where    is pancakes house?