in reply to Re^3: Passing an array to a subroutine help?!
in thread Passing an array to a subroutine help?!

The variable $min in your main program has nothing to do with the variable $min in the subroutine sub min {...}. Also see Coping With Scoping.