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!

Using the System function to point to c:\Progra files

Status
Not open for further replies.

sumncguy

IS-IT--Management
May 22, 2006
118
US

Rookie here

I want to be able to run an executable from inside a perl script ...

sub DBAC {
system("zoc.exe");
}
&DBAC

Ive also tried
system("zoc");
system("c:\Program Files\zoc\zoc.exe");
 
like this:

system('c:\Program Files\zoc\zoc.exe');

use single-quotes otherwise the backslashes are interpolated as escape characters. Or better, use forward slashes to avoid the interpolation of the back-slashes in directory paths:

system('c:/Program Files/zoc/zoc.exe');

Windows fully supports forward slashes, but DOS does not.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top