This sounds suspiciously homework-ish, so I'll point you towards some references which will help you work this out yourself:
In reply to Re: print array of hashes
by BioLion
in thread print array of hashes
by fionbarr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |