mirror of
https://github.com/mi57730/a2d.git
synced 2024-08-16 19:29:13 +00:00
15 lines
199 B
Perl
15 lines
199 B
Perl
|
#!/usr/bin/env perl
|
||
|
|
||
|
use strict;
|
||
|
use warnings;
|
||
|
|
||
|
my $depth = 0;
|
||
|
|
||
|
while (<STDIN>) {
|
||
|
++$depth if m/\.proc/ || m/\.scope/;
|
||
|
|
||
|
print "$depth - $_";
|
||
|
|
||
|
--$depth if m/\.endproc/ || m/\.endscope/;
|
||
|
}
|