Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Perl : Convert a monolithic code to a function

by user786 (Sexton)
on Jun 29, 2014 at 00:58 UTC ( [id://1091593]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1091593]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-18 06:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found