What you've posted here is pretty much an exact duplicate of Re^24: Unable to create a Pivot chart with visiable Columns from seven months ago, it would have been good if you had linked to that thread for context. So that we don't have to re-read that entire thread, it would be best if you could provide context to your question - see How do I post a question effectively? and Short, Self-Contained, Correct Example.
In general, please use <p> tags instead of <code> tags for text; the latter should be used for code, sample input, and output. Also, you posted this in Perl Monks Discussion, the correct section for questions is Seekers of Perl Wisdom (I have moved your post, please don't re-post).