The current working directory is NOT always where the script lives.  If
you run the script from another directory, it's that directory.  That's
where it's looking for the file.


[EMAIL PROTECTED] (Hans Holtan) wrote:
>Hi everyone,
>I find that I must use absolute directory paths to access files from 
>my perl scripts. If I just name a file:
>       open (FH, "<somefile") || die;
>
>It will not be found even if it is in the exact same directory as my 
>perl script.
>
>What's going on, and how do I fix it?
>
>Thanks for your help!!
>
>Hans Holtan
>(I am working on a mac with OS X)
>
>-- 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  [EMAIL PROTECTED]                            The Math Forum

Reply via email to