Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: .bat and perl mystery

by Joost (Canon)
on Jun 12, 2002 at 16:35 UTC ( #173916=note: print w/replies, xml ) Need Help??


in reply to .bat and perl mystery

IANAWE (I'm not a windows expert) but it seems to me you need to run a .bat script trough an interpreter. Have you tried sytem("cmd $batchfile") or system("command $batchfile")

If this doesn't help, can you specify what you mean with When it executes in the script it acts as though it has executed but in reality it hasn't - maybe with a small code example?

-- Joost downtime n. The period during which a system is error-free and immune from user input.

Replies are listed 'Best First'.
Re: Re: .bat and perl mystery
by Anonymous Monk on Jun 12, 2002 at 16:43 UTC
    Unfortunatley, I can't provide the code, because it's dealing with the 'vcvars32.bat' file (environment for Visual Studio 6.0) I get the message: "Setting environment for using Microsoft Visual C++ tools.", but it hasn't actually changed the environment. If I execute the batch file from the command line and then run my perl script is works fine....DAMN Microsoft!
      execution path:

      run perl script -> start new environment space and run batch file -> return to old environment space inside perl script (no changes made to environment)

      check out tye's SetEnviron.bat for more info on your real problem.

      ~Particle *accelerates*

      Mmmm... Nice problem

      Here's my guess:
      It _does_ adapt your envirnoment, but the valuea are set back once the perl script ends...

      er formait hyarya.
      -- "Life is a house and the next tornado is never far away"
      -- "lovely by nature"

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2020-02-29 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (128 votes). Check out past polls.

    Notices?