in reply to Re^2: Perl : Convert a monolithic code to a function
in thread Perl : Convert a monolithic code to a function

Tutorials: Variable Scoping in Perl: the basics...

mysub( $ssh, "config.txt" ); sub mysub { my( $ssh, $filename ) = @_; ... }