The issue is that cookies only accept strings as their values.
In reply to Re^2: CGI cookie turns array ref into string by dsheroh in thread CGI cookie turns array ref into string by Anonymous Monk