Because you are using a prototype (\%) which is only accepting %vars and delivering refs.
Better don't use prototypes if you don't know how to handle them... or in other words if you are a beginner.
see perlsub#Prototypes for details
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re: printing complex data structures (prototypes)
by LanX
in thread printing complex data structures
by ic23oluk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |