in reply to Re^2: mail script with attachmentin thread mail script with attachment
But, where is $line defined?
See $/ to slurp the file in a variable