in reply to LOG FILE HELP IN PERL

my $uid = <$input_fh>; ($uid) = $uid =~ /UID=(\S+)/;
That tries to find a UID in the first paragraph of the file. However, the first paragraph is the line starting with QA-METS. You want to skip the first paragraph, and do this match against the second.