in reply to (Ovid) Re: Regular Expression Tweaking
in thread Regular Expression Tweaking

Why use a regex that changes the behavior for whitespace-only lines? Matching "something other than newline" can be written as /[^\n]/ or more succinctly as </code>/./</code>
chomp $line if $line =~ /./;
Note: this wont behave the same as the original for strings consisting entirely of multiple newlines. i.e. original chomped "\n\n\n\n", this will not.;

-Blake