| imfaus 2005-08-05, 11:01 am |
| I am trying to script a perl program that will stop mysql (on a windows system) apparently I can't simply use a net stop msyql command instead I need to add a line that says use win32; in my perl script and create a function that sends a call to the service control manager to tell it to stop mysl and then it will do that...this seems way to complicated..so I wanted to imbed or call a batch file within my perl program to do just this...but its having some issues...here is the line in question
print "Obtain most recent unixtimestamp in the database\n";
#Obtain most recent unix_timestamp in the database
my $preparequery;
my $sth;
my $myquery0 = 'select now();';
my $sth = $dbh->prepare($myquery0);
$sth->execute();
my @timestamp = $sth->fetchrow_array();
print "the current unix timestamp is: $timestamp[0]\n";
'd:\stopmyql.bat';
I have print statements but it never completes this command...is there a particular syntax I am missing? I am a newbie to perl thanks |