in reply to Test for newline
Use ^ and $
It'll match only \n contains
$discovered[$i] =~ "^\n$"; [download]