Help for this page
while ($fh) { /^Confname/ or next; work_with $_; last; ## if you want to process only the first ocurrence of such l +ine }
my @confnames = grep /^Confname/, <$fh>; ## if you want to process all lines: work_with $_ for @confnames; ## else: work_with $confnames[0];