Try:
open(FH, "<./somefile")
or die "file error: $!\n";
That will at least tell you the error when it fails and the "./" tells
perl you want the file in the directory your script is in.
On Monday, July 16, 2001, at 04:01 PM, Hans Holtan (by way of 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]
>
Cheers,
--Ed