Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- use strict;
- use warnings;
- my $ls=0;
- my $cmd=undef;
- while(<>) {
- s/^ {4,8}/\t/;
- s/^[\t\s]+/ / if $ls;
- if (m/^(\/.*)/) {
- $cmd=$1;
- next;
- }
- if (m/\\$/) {
- s/\s*[\\\r\n]+$//;
- $ls=1;
- } else {
- $ls=0;
- }
- print join' ',$cmd,$_;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement