in reply to Re: Using currently selected filehandle
in thread Using currently selected filehandle

Thanks, that's exactly what I was looking for.

What's going on there? Is select being called in a typeglob context, and so returning a typeglob instead of a string?

  • Comment on Re: Re: Using currently selected filehandle

Replies are listed 'Best First'.
Re^3: Using currently selected filehandle
by particle (Vicar) on Jun 23, 2003 at 19:11 UTC

    there is no typeglob context, but you're on to something. when you assign the result from select to a scalar, it stringifies the IO type that select normally returns. since there's no sigil for an IO type, you usually assign to it through a typeglob. since typeglobs cannot be lexical, you cannot use my to limit their scope. instead, you must use local, which will limit their scope to the current block, and create the typeglob, if it doesn't already exist.

    hope that helps.

    ~Particle *accelerates*