O, Great Monks, I've a problem which seems a bit odd and has me both stumped and stupefied

My operating environment is Windows XP Pro. I am developing a program as a wrapper for an InstallShield 11.5 command line build; my program edits the project file (which resembles XML in overall format). This part is not the problem.

The problem is that the program writes a command line ($command). When the command is executed by means of either system($command) or open(my $fh, "$command |") or die, the command fails. My first thought was "no mystery, here. I'm an idiot and screwed up the command line". This thought was wrong. The command line written by my program works fine when executed from the command prompt or from a .bat file. I'm now a confused. Why should this happen? I'm wondering if any of these modules overload either system or open.

use Carp; use ActiveState::DateTime qw(check_date); use Cwd; use Fcntl; use Getopt::Long; use Pod::Usage; use POSIX ; use Tie::File; use Tk; use Win32; use Win32::Process; use Win32API::File qw(:ALL); use constant

Update

After some prodding by CountOrlok (thank you), I poked and tested a bit more thoroughly. My problem occurs because a tied file does not appear to be getting untied; the untie returns an error (untie attempted while 1 inner references still exist).


Reformatted per suggestion by jdporter.

emc

" When in doubt, use brute force." — Ken Thompson

In reply to Execution fails from within Perl; succeeds outside Perl by swampyankee

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.