From b26053326e3a22678129db193535f0beec36d3c7 Mon Sep 17 00:00:00 2001 From: Andinus Date: Sun, 10 May 2020 02:39:01 +0530 Subject: Replace tab characters with spaces Emacs was mixing them up. (setq-default indent-tabs-mode nil) prevents this. --- pictor.pl | 28 ++++++++++++++-------------- 1 file 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++; + } } } -- cgit 1.4.1-2-gfad0