Use ^ and $
It'll match only \n contains
$discovered[$i] =~ "^\n$"; [download]
In reply to Re: Test for newline by gopalr in thread Test for newline by tlemons