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.

HTH,

Rob

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


Reply via email to