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:
parent
c04eccbd1e
commit
7ebe1c3acf
@ -8,7 +8,7 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
while (<STDIN>) {
|
||||
while (<>) {
|
||||
chop;
|
||||
s/#.*//;
|
||||
next unless /^device/;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
while (<STDIN>) {
|
||||
while (<>) {
|
||||
chop;
|
||||
s/#.*//;
|
||||
next unless /^device/;
|
||||
|
@ -2,7 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
$lno=0;
|
||||
while (<STDIN>) {
|
||||
while (<>) {
|
||||
chop;
|
||||
s/#.*//;
|
||||
s/\f//g;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
while (<STDIN>) {
|
||||
while (<>) {
|
||||
chop;
|
||||
s/#.*//;
|
||||
next unless /^device/;
|
||||
|
Loading…
Reference in New Issue
Block a user