Perl remote commands

Im trying to write a script where I need to run some commands on a remote server. Following is the description
--script is being run from the host A
--no CPAN modules are allowed to install.

1. ssh in to the host B which is an oracle box (public key ssh is enabled & )
2. from host B, I need to be able to connect to the DB as sysadmin (sqlplus "/ as sysdba") and run a command probably ("select * from tab;") and assign it in to a variable.

It really depends on the system and set-up on platform B. You may need to source the .profile (or something equivalent) before you can run the sqlplus command, so that the environment variables are correctly set-up.

It usually takes a bit of trying various things before succeeding to have it right.

Hi Bindo,
I had the same problem at my work - nothing can be installed (including Perl modules) on any of the machines but then I learn how do do this manually (thanks to this website, Fish and Omega personally). Try it Dude, your life will become much easier.
Thanks, testerV

First off, I'd prefer not advising people to violate their workplace policies, as it could result in disciplinary procedures being levied against them, or worse, dismissal

Sometimes it helps to think of policies as living documents which can be changed over time, with some controlling restraints, like logs of permitted policy breach, with management signoff, etc, etc

banking and other organisationsare completely anal about some of these policies and it's with good reason, as undocumented software changes in production environments are not something to be taken lightly

If they are rigid on this policy, then ask about their software release methodology/policy

The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones

09 F9 11 02
9D 74 E3 5B
D8 41 56 C5
63 56 88 C0
Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. -- Jamie ZawinskiDetavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...BIT COINS ANYONE

1. ssh in to the host B which is an oracle box (public key ssh is enabled & )
2. from host B, I need to be able to connect to the DB as sysadmin (sqlplus "/ as sysdba") and run a command probably ("select * from tab;") and assign it in to a variable.

This is a simple example of using ssh to run sqlplus on remote host and populate variable on local host which is what I believe you are trying to do:

Depending on how your environment is set up, you can create processes on remote machines using WMI. Consult with your network / Windows administrator for the proper approach.

Short of finding out what mechanisms are available on Windows, we can't help you. This is not as much a Perl question but a question about your computing environment, and you are much closer to the people who know about that than we are.