But, where is $line defined?
See $/ to slurp the file in a variable
In reply to Re^3: mail script with attachment by i5513 in thread mail script with attachment by zlinkexchange