in reply to Re^2: XML::Path Errors
in thread XML::Path Errors

Your reply makes no sense. $list_item is not assigned to anywhere in the code you show. Maybe you mean something else?