First you should explain what comprises a "column". In your script, you split both files on
/\t/ (a tab), so your ptt.txt (which is
one single line, btw.) probably has the word "Location" as first column, and the third column of mapped.txt is the string "gi|448814763|ref|NC_00096".
Most probably that is not what you want.