in reply to hashs and file handle globs

The problem is that perl is parsing your filehandle iterations as a glob() e.g
shell> perl -MO=Deparse -e 'open(0); @f=*0; print <$f[0]>' open *0; @f = *0; print CORE::GLOBAL::glob($f[0], 0); -e syntax OK
You probably want to use the readline() function instead.
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: hashs and file handle globs
by jroberts (Acolyte) on Nov 20, 2002 at 15:56 UTC
    thanks for your help. you are correct that readline() does indeed work. It may be me, but it seems that scalars and hash or array members should be treated the same here? Anyway, I'm grateful it works.
      It may be me, but it seems that scalars and hash or array members should be treated the same here?
      The problem is that perl's globbing syntax looks very similar to it's filehandle access syntax. So anything that looks more complex than a bareword or a scalar is assumed to be a glob. Of course this is where the glob() and readline() functions step in and erase any ambiguity.
      HTH

      _________
      broquaint