[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] bad file handle



Era Eriksson wrote:
> 
> On Tue, 19 Mar 1996 10:41:42 -0800 (PST),
> Jeffrey Dawkins <batcomp@teleport.com> wrote:
>  > open($PRICE_FILE, "../sys2.txt");
>         ^
> Scratch the dollar sign. 

Er, no.

To quote the Camel book on open(): "FILEHANDLE may be a directly
specified filehandle name, or an expression whose value will be used 
for the filehandle. The latter is called an indirect filehandle.
Typically it is just a variable containing the name of a filehandle."

So there are contexts in which you might want to use a scalar as
a filehandle.

-- Charlie