diamondsandperls has asked for the wisdom of the Perl Monks concerning the following question:

when i compile my perl program with perlApp --gui to have no dos pop up window chdir is not working my log file gets wrote in the same location as the .exe is ran if i specify the logfile to be the full path same thing happens??

Replies are listed 'Best First'.
Re: perlApp --gui and chdir
by dasgar (Priest) on Jul 01, 2012 at 20:34 UTC
      i am trying to get a logfile to write in a specific location no matter where i run the compiled .exe from so if i do

      my $file = pathtofile;

      When I open a output file handler on the output file i want the data to be written to the path but everytime no matter what i try this is not the case it will write the log file to where ever i run the .exe from

      Thanks for the response

        If you're using an absolute path, what has chdir got to do with it?

        I'll bet you're not doing any error checking either, open can fail you know