2
0

tab_num.pl 162 B

1234567891011121314151617
  1. #!/usr/local/bin/perl
  2. $num=1;
  3. $width=40;
  4. while (<>)
  5. {
  6. chop;
  7. $i=length($_);
  8. $n=$width-$i;
  9. $i=int(($n+7)/8);
  10. print $_.("\t" x $i).$num."\n";
  11. $num++;
  12. }