in reply to Re^2: Perl : Convert a monolithic code to a functionin 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 ) = @_; ... } [download]