in reply to
Re^4: Delete parse data spreadsheet::parseexcel
in thread Delete parse data spreadsheet::parseexcel
Your inconsistent indention makes it very hard to read, but it seems that's still not the entire script. At least there are unclosed curly braces.
You don't seem to keep references to Spreadsheet::ParseExcel objects, so unless your version of that module is very old, no memory should leak from here.
One thing I do notice is that $materialmapping_table_xml will continually grow, and there's not much you can do about it, except moving to a solution that writes each $materialmapping_item to a file, and then stops keeping it in memory.