T
thomasjbs
I have a server process that allows queries and updates manually that I
want to automate.
I can actually connect to the service and make changes only if I pass
pre-known arguments that are then successfully changed on the server.
I do this with:
$object = $ARGV[0];
open(FILEIN,'| serverapp.exe');
print FILEIN "delete $object from dblist\n";
The problem is that I must manually specify what $object is before the
function works. There is another command (besides "delete") that tells
me a list of objects that I can obtain like this:
print FILEIN "list dblist name\n";
The above command will direct the server to print out all of the object
names in dblist - but I don't know how to capture the output in Perl.
I tried a number of pure guesses:
$r = print FILEIN "list dblist name\n";
and
$r = `print FILEIN "list dblist name\n"`;
I need to capture the output of a FILE HANDLE that lists output from
text commands printed to the FILE HANDLE.
want to automate.
I can actually connect to the service and make changes only if I pass
pre-known arguments that are then successfully changed on the server.
I do this with:
$object = $ARGV[0];
open(FILEIN,'| serverapp.exe');
print FILEIN "delete $object from dblist\n";
The problem is that I must manually specify what $object is before the
function works. There is another command (besides "delete") that tells
me a list of objects that I can obtain like this:
print FILEIN "list dblist name\n";
The above command will direct the server to print out all of the object
names in dblist - but I don't know how to capture the output in Perl.
I tried a number of pure guesses:
$r = print FILEIN "list dblist name\n";
and
$r = `print FILEIN "list dblist name\n"`;
I need to capture the output of a FILE HANDLE that lists output from
text commands printed to the FILE HANDLE.