Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: perlApp --gui and chdir

by Anonymous Monk
on Jul 01, 2012 at 20:43 UTC ( #979322=note: print w/ replies, xml ) Need Help??


in reply to Re: perlApp --gui and chdir
in thread perlApp --gui and chdir

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


Comment on Re^2: perlApp --gui and chdir
Re^3: perlApp --gui and chdir
by Anonymous Monk on Jul 01, 2012 at 21:00 UTC

    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

      all works fine as a .pl so error checking has nothing to do with this

        all works fine as a .pl

        Prove it.

        so error checking has nothing to do with this

        Sure it does.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2014-09-20 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (163 votes), past polls