Created
          August 8, 2016 19:39 
        
      - 
      
- 
        Save dougluce/832a235ea9b49646a6003bd691cf6331 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | while(<>) { | |
| chomp; | |
| my $len = length($_); | |
| my $steps = int(log($len)/log(10)); | |
| for (my $o = $steps; $o >= 0; $o--) { | |
| my $n = 1; | |
| for (my $i = 0; $i < $len-(10**$o)+1; $i+= 10**$o) { | |
| print " " x ((10**$o)-1) . ($n++ % 10); | |
| } | |
| print "\n"; | |
| } | |
| print "$_\n"; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment