Rob Dixon wrote:
> jis wrote:
>> I tried what John suggested.
>> the exact error code is "Couldnt open C:/Program Files/Perl Express/
>> Debug/pdef.txt - No such file or directory"
>> (yes, iam using perl express)
>> i do not want to ask user (who finally uses my executable) to put the
>> file always on a fixed location..
>> i want the user to keep the file to read in the same path as
>> executable is.
>>
>> Any hopes!!
> 
> Ah! So you are using Perl Express after all!
> 
> Your problem is because you are debugging your program, not running it, which
> makes it a Perl Express process not a Perl one. Try running as your users 
> would
> and it should be fine.
> 
> If you want a way to make the behaviour under debugging closer to a simple 
> run,
> then you could add
> 
>   use File::Basename 'dirname';
>   chdir dirname $0 or die $!;
> 
> early in your program.

I am sorry, but even that work around won't help. I have downloaded a copy of
Perl Express and I see that it is not running your script at all when you are
debugging. If you look in $0 you will see that it contains

  C:\Program Files\Perl Express\Debug\temp1.cgi

so what is running is a different program altogether. Perl Express has copied
your source to its own Debug directory, heavily modified it to support its
debugging tools, and even renamed it beyond recognition. As far as I can tell
you don't stand a chance of getting this working under this debugger, sorry!

At least it should work for your users.

Rob

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to