Use while (<>) instead of while(<STDIN>) so that perl will automagically

deal with filename arguments.  It is amazing how much you forget over time.

Thanks to the people that reminded me this.  I knew there was an easy way
that didn't involve messing with $argv, filehandles, etc, but just could
not remember - all of my books are on the opposite side of the planet..
This commit is contained in:
Peter Wemm 2000-06-17 19:06:13 +00:00
parent c04eccbd1e
commit 7ebe1c3acf
4 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@
#
# $FreeBSD$
while (<STDIN>) {
while (<>) {
chop;
s/#.*//;
next unless /^device/;

View File

@ -8,7 +8,7 @@
#
# $FreeBSD$
while (<STDIN>) {
while (<>) {
chop;
s/#.*//;
next unless /^device/;

View File

@ -2,7 +2,7 @@
# $FreeBSD$
$lno=0;
while (<STDIN>) {
while (<>) {
chop;
s/#.*//;
s/\f//g;

View File

@ -8,7 +8,7 @@
#
# $FreeBSD$
while (<STDIN>) {
while (<>) {
chop;
s/#.*//;
next unless /^device/;