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

This is what i tried ,when i compile the code it doesn't throw an error.But it is not working, Am i missing something here?
sub mysub { my ($var1) = @_; $ssh->exec("cmd1"); $ssh->exec("cmd2"); open my $prep, '<', $var1; while (my $config = <$prep>) { chomp $config; my $conf = $ssh->exec("$config"); print("$conf"); } mysub("config.txt");

Replies are listed 'Best First'.
Re^3: Perl : Convert a monolithic code to a function
by Anonymous Monk on Jun 29, 2014 at 01:09 UTC