use strict; use warnings; # some gratituitous # and wacky # comments my $filename = "next.pl"; open(SOMEFILE, $filename) or die "Could not open file $filename"; LINE: while () { # if the line starts with a comment, then skip it next LINE if ( /^\s*#/ ); print "LINE: $_"; } close(SOMEFILE);