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 Mike Lewis 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.

tar565

Programmer
Jan 24, 2005
39
0
0
IE
i have created a batch file and I now wish to run it from a perl script. How do I execute it? Can I do it with the system() command??? I am using windows.
 
Try the following.

@args = ("command", "arg1", "arg2");
system(@args) == 0
or die "system @args failed: $?"


 
So I should try :

my $File = 'LogFile.bat';
@args = ($File);
system(@args) == 0 or die "system @args failed: $?
 
$result=`path/to/batch_file arg1 arg2`;
--Paul

cigless ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top