summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-05-10 02:39:01 +0530
committerAndinus <andinus@nand.sh>2020-05-10 02:39:01 +0530
commitb26053326e3a22678129db193535f0beec36d3c7 (patch)
treefdeb1f2b37c26c939403d2f29e5ff72f198d4ecc
parentb09f4f7cedee63dd9f8e68be92997d5b6a9ecb09 (diff)
downloadpictor-b26053326e3a22678129db193535f0beec36d3c7.tar.gz
Replace tab characters with spaces
Emacs was mixing them up.

(setq-default indent-tabs-mode nil) prevents this.
-rwxr-xr-xpictor.pl28
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++;
+        }
     }
 }