#!usr/bin/perl use strict; use warnings; while (my $line = ) { 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