From: Jonathan Blake Date: Tue, 13 Aug 2019 02:34:45 +0000 (-0700) Subject: Read from both STDIN and named files X-Git-Tag: 29tsoc-20200103~68 X-Git-Url: http://git.projectaon.org/?p=project-aon.git;a=commitdiff_plain;h=199bda46e421682e76a09115fbb5770b29080b78 Read from both STDIN and named files --- diff --git a/common/scripts/split-sections.pl b/common/scripts/split-sections.pl index 59ceef4..f16d2a8 100755 --- a/common/scripts/split-sections.pl +++ b/common/scripts/split-sections.pl @@ -1,4 +1,4 @@ -#!/bin/env perl +#!/usr/bin/env perl use strict; use autodie; @@ -13,7 +13,7 @@ my $line = ""; my $section = ""; my $filename = ""; -while ($line = ) { +while ($line = <>) { chomp ($line); print STDERR "DEBUG: Reading '$line'\n" if $debug; if ($line =~ /^(\d+)$/) {