in reply to function prototyping & perl 5.8.20

I think that you should probably just change:
sub get_stack_list() { # ...
to:
sub get_stack_list { # ...
i.e. remove the pair of parentheses after the subroutine name. This change should work on both your Perl versions.