go ahead... be a heretic | |
PerlMonks |
Re: How do I run a .bat file?by blackmateria (Chaplain) |
on Oct 24, 2001 at 02:39 UTC ( [id://120942]=note: print w/replies, xml ) | Need Help?? |
Etelka, you need to escape the backslashes (i.e. double them up):
system ("d:\\webmaster\\cgi-bin\\comb.bat"); Otherwise perl sees "\cg" and "\co" from "\cgi-bin\comb.bat" and interprets them as control characters. That'll give you get a "file not found" error instead of running the batch file like you expect. Hope this helps!
In Section
Seekers of Perl Wisdom
|
|