view TL1/toasm.pl @ 180:c3145f913f3d default tip

possible features
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 04 May 2019 11:17:42 +0900
parents 8f2154d95a04
children
line wrap: on
line source

#!/usr/bin/perl

my $indent = 7;
while(<>) {
    s/\r\n$//;
    s/^\d+ //;
    s/^ /" "x$indent/e;
    if (/^([a-zA-Z0-9]+) /) {
        my $w = $1;
        if (length $w < $indent) {
            my $s = " "x($indent-length $w);
            s/ /$s/e;
        }
    }
    print $_,"\n" 
}