in reply to Dealing with files that contain '@' in the filename
Are you aware that $diag_file has literal backslashes in it?