APM: Asking again because I'm dense... Running a prog from a prog?
CaptNemo
CaptNemo at Austin.rr.com
Fri Oct 20 13:08:12 PDT 2006
Sorry to ask this again but, I just can't grasp system() and get it to work....
I have written a program named gettables.pl which reads all the tables in
a database and prints them out. The program is run with this line:
gettables.pl mysql database user password
It in turn prints out a list of the tables in the database-
EXAMPLE:
products
inventory
porn_collection
accounts
I need to execute this FROM my web page generator program and have the
print result returned so I can make a table.
I have tried:
$dbtable = `gettables.pl mysql database user password`;
my $command = "gettables.pl mysql database user password4";
$dbtable = `$command`;
$dbtable = system(gettables.pl mysql database user password);
my $command = "gettables.pl mysql database user password";
$dbtable = system($command);
@dbtable = system(gettables.pl mysql database user password);
my $command = "gettables.pl mysql database user password";
@dbtable = system($command);
How can I do this without having to write a file and read the results?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/austin/attachments/20061020/3dc822d8/attachment.html
More information about the Austin
mailing list