]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - bin/remove-continuation.pl
bin/remove-continuation.pl: read from STDIN only
[config/dotfiles.git] / bin / remove-continuation.pl
index 8658df8033109d379fe73168beced34c8ba4bb21..3deb7d7d376b4d9980083b3bf2a0095fef4486f8 100755 (executable)
@@ -24,17 +24,17 @@ use warnings;
 
 
 my $continuation = 0;
-while (my $line = <>) {
+while (<STDIN>) {
     # Remove leading whitespace if the last line was a line continuation.
     if ($continuation) {
-        $line =~ s/^\s+//;
+        s/^\s+//;
     }
 
-    if ($line =~ /^(.+?)\\$/) {
+    if (/^(.+?)\\$/) {
         print $1;
         $continuation = 1;
     } else {
-        print $line;
+        print $_;
         $continuation = 0;
     }
 }