I find this error message highly suspect. You claim that the above is (part of) the code you run, but there is very little chance that the call to ->worksheet() succeeds while the call to ->add_chart fails due to $template not being defined.
Please post a short, self-contained example so that we can replicate your problem.
In reply to Re^3: perl help
by Corion
in thread perl help
by snemmal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |