Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

batch files

Status
Not open for further replies.

jimmyJIMMYyaya

Programmer
Sep 30, 2001
13
CA
hey all

heres the prob


sub initialize
{
system( "startTime.bat" );

print "Content-type:....";
}


sub process
{
do something....
}

sub terminate
{
system( "endTime.bat" );

do something;
}

-ok the first batch program i call works perfectly.
-the last batch program i call wont run.

is this because its in between the print "Content-type..."
and if so how can i end the print "Content-type..." so i can get this batch to execute?

thanks for all you help in advance :)
-::JjYY::-

 
The print "Content-type..." has nothing to do with it.

You should be able to build a small version of this flow to troubleshoot your problem. Maybe something like,
Code:
#!/usr/local/bin/perl
print "Running first bat\n";
&run_first_bat;
&do_stuff;
print "Running next bat\n";
&run_next_bat;

sub do_stuff { print "Doing Stuff Here.\n"; }
sub run_first_bat 
    {
    system(echo,1);
    print "leaving run_first\n";
    }
sub run_next_bat 
    {
    system(echo,2);
    print "leaving run_next\n";
    }

Another Question: What can you possibly be doing in a bat file that is not easier and more efficient with Perl? Maybe the real question is how do you do what the bat files are doing in Perl so you are not making system calls.

HTH
If you are new to Tek-Tips, please use descriptive titles, check the FAQs,
and beware the evil typo.
 
That first question about the bat files sounds almost exactly like what I asked in the perl forum. He's trying to get the time in milliseconds. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top