in reply to First attempt!

Don't use @foo[3] where $foo[3] will do.

-- Randal L. Schwartz, Perl hacker