Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!samsung!uakari.primate.wisc.edu!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Weirdness with <> input operator Message-ID: <11650@jpl-devvax.JPL.NASA.GOV> Date: 1 Mar 91 19:00:42 GMT References: <1991Feb28.171434.6125@wuphys.wustl.edu> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 20 In article <1991Feb28.171434.6125@wuphys.wustl.edu> marty@wuphys.UUCP (Marty Olevitch) writes: : Also, I found that using the <> operator with an array argument, : for example <@foo> , reads the next item in the foo array. But I didn't : see this documented in the perl book, at least where the main discussion : of the input operator takes place. Going back to the first example, : does perl think that $handle[$i] is supposed to be an array? No, it thinks it's a glob. The only kind of indirect filehandle allowed is a bare scalar variable with no intervening whitespace: <$indirect_filehandle> Anything else is a glob (interpreted like a double-quoted string first). It could be argued that <> is too heavily overloaded, but it's nice to be able to say: while (<$dir/*.bak>) { ... Larry