This allows you to use a normal loop construct (makes sense to me) and short-circuit it at the beginning if certain conditions are met. It makes cleaner code than a lot of if-elsif statements.while (<FILE>) { next if /^#/; # skip lines starting with comments next unless /\S/; # do something with a real line here }
In reply to Re: How do I remove blank lines from text files?
by chromatic
in thread How do I remove blank lines from text files?
by dumpest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |