in reply to Re: perl subroutine in XMetaL macro - $path not being passed to batch file on Windows 7
in thread perl subroutine in XMetaL macro - $path not being passed to batch file on Windows 7

Thanks for the reply. Yes, I'm aware it's not a Perl problem. The only change to my environment is the migration from WinXP 32bit to Win7 64bit.

I believe it has to do with the Win32:OLE declaration.

Does this invoke the 32bit or 64bit process? My research on this is confusing.

If so, what is the correct call here?

  • Comment on Re^2: perl subroutine in XMetaL macro - $path not being passed to batch file on Windows 7

Replies are listed 'Best First'.
Re^3: perl subroutine in XMetaL macro - $path not being passed to batch file on Windows 7
by BrowserUk (Patriarch) on Dec 16, 2014 at 02:05 UTC

    Sorry, but I haven't got to Windows 7 yet, so I've not had to look for a solution to this. You'll need to look/ask elsewhere (try MS forums?).

    1. I do have to wonder why you have to use OLE to start wscript when you can do that directly from perl:
      system 'wscript arg1 arg2';
    2. And why do you you need to use Wscript to run a batch file, when that can be done directly from Perl:
      system q[x:\path\to\thebatch.bat];
    3. And why do you need to run a batch file in order to run perl.exe, when that can be done directly from Perl:
      system qq[$^X c:\\path\\to\\thePerlScript.pl arg1 arg2];

    But I assumed that there must be very special circumstances for what you are doing because no one could arrive at that level of unnecessary indirection by accident.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      BrowserUk:

      But I assumed that there must be very special circumstances for what you are doing because no one could arrive at that level of unnecessary indirection by accident.

      I'm thinking it may have been a team effort! <rimshot/>

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

      Many thanks for your input.

      These processes were evolved over time by predecessors.

      My Perl wisdom is at a basic level and the reason for these avenues are buried in time.

      However, you have certainly given me food for thought - thanks again.