in reply to Re^3: First attempt at bringing in file for input/output
in thread First attempt at bringing in file for input/output
To make this work completely
In such loops I prefer to limit the scope of $line but this might not concern you.
#!usr/bin/perl use strict; use warnings; while (my $line = <DATA>) { last unless $line =~ /\S/; print "Read: $line"; } __DATA__ do a thing with non blank line do a thing with non blank line last one no action on this line nor this
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: First attempt at bringing in file for input/output
by Marshall (Canon) on Oct 25, 2018 at 18:53 UTC | |
by soonix (Chancellor) on Oct 26, 2018 at 08:15 UTC | |
by Marshall (Canon) on Nov 02, 2018 at 23:37 UTC |