diff options
author | Andinus <andinus@nand.sh> | 2020-05-10 02:39:01 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2020-05-10 02:39:01 +0530 |
commit | b26053326e3a22678129db193535f0beec36d3c7 (patch) | |
tree | fdeb1f2b37c26c939403d2f29e5ff72f198d4ecc | |
parent | b09f4f7cedee63dd9f8e68be92997d5b6a9ecb09 (diff) | |
download | pictor-b26053326e3a22678129db193535f0beec36d3c7.tar.gz |
Replace tab characters with spaces
Emacs was mixing them up. (setq-default indent-tabs-mode nil) prevents this.
-rwxr-xr-x | pictor.pl | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/pictor.pl b/pictor.pl index ec59229..11778af 100755 --- a/pictor.pl +++ b/pictor.pl @@ -36,7 +36,7 @@ my @files = ( # Unveil each file with only read permission. foreach my $fn (@files) { unveil( $fn, "r" ) or - die "Unable to unveil: $!"; + die "Unable to unveil: $!"; } # Block further unveil calls. @@ -53,22 +53,22 @@ my $total_acronyms = 0; # Search for acronym in every file. foreach my $fn (@files) { open my $fh, '<', $fn or - # The program should continue if the file doesn't exist but - # warn the user about it. - do { - warn "Unable to open $fn: $!\n"; - next; + # The program should continue if the file doesn't exist but + # warn the user about it. + do { + warn "Unable to open $fn: $!\n"; + next; }; while (my $line = readline $fh) { - # \Q is quotemeta, \E terminates it because otherwise it would - # mess with \t. This regex matches when $line starts with - # "$term\t". We replace \t with ": " before printing to make - # the input neat. - if ($line =~ /^\Q${term}\E\t/i) { - print $line =~ s/\t/: /r; - $total_acronyms++; - } + # \Q is quotemeta, \E terminates it because otherwise it would + # mess with \t. This regex matches when $line starts with + # "$term\t". We replace \t with ": " before printing to make + # the input neat. + if ($line =~ /^\Q${term}\E\t/i) { + print $line =~ s/\t/: /r; + $total_acronyms++; + } } } |