Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: .bat and perl mystery

by insensate (Hermit)
on Jun 12, 2002 at 16:41 UTC ( #173919=note: print w/replies, xml ) Need Help??

in reply to .bat and perl mystery

First, I would run a simple file test to make sure your script can see the file, something like

unless(-e "yourscript.bat") { print "Cannot see yourscript.bat...\n"; }

Then, a simple system("yourscript"); call should work. Also, if your .bat script writes output, try redirecting it to a file eg. system("yourscript > out.txt");Please post the relevant sections of your code so we can be of more assistance.

Replies are listed 'Best First'.
Re: Re: .bat and perl mystery
by Anonymous Monk on Jun 12, 2002 at 16:57 UTC
    OK, I think this might have something to do with it. It can't see the .bat file, but I'm able to execute it from the command line in the same directory as my perl script.
      Ah...perhaps the .bat file is in a directory in your %PATH% env variable...try hardcoding the entire paths in your script...remember to escape the \ characters for win32 "c:\mydir\myfile" would be "c:\\mydir\\myfile"

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://173919]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2022-05-25 15:49 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (90 votes). Check out past polls.