I know you posted this to ask for different ways to do it, so my comment isn't really fair.  but...
A principle from Extreme Programming is "You ain't gonna need it".  What you have now is probably fine.  You're sorting by users and then by systems per user which I guess is what you meant by 'multiple e-mail accounts'.  If you're calling the function more than once per run you could probably move @SYS and %POVars outside the function, since they only need to be set once, but that's about it.
Basically, having %accounts setup the way you need it is what really matters.  Perl lets you process it this way and that whenever you need to, without much fuss.
Only if it's looking like a lot of different scripts (or a few really complex ones) are going to be kept around and need to be maintianed or you find yourself typing the same code over and over to access it, would you need to go further.  Then, work out a simple useful interface (eg, 
@accts = $accts->user($ssn);  hmmm, is that simpler?) and build an encapsulating object.
update: I didn't emphasize the central advantage of waiting, which is that by waiting until you need it, you'll know much more specifically what you want to do.
 
p
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.