in reply to simple array question
Have a look at the splice function in the perlfunc documentation page.
In your case, splice(@1, $#1, 1) will do the trick.
Hope this helps, -gjb-