Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!psuvax1!news From: flee@shire.cs.psu.edu (Felix Lee) Newsgroups: comp.lang.perl Subject: Syn-taxing filehandles (Re: simple script ...) Message-ID: Date: 8 Mar 90 14:34:04 GMT References: <257@cmic.UUCP> <7335@jpl-devvax.JPL.NASA.GOV> Sender: news@cs.psu.edu (Usenet) Organization: Penn State University Computer Science Lines: 35 Urf, I just noticed this: > printf(wow "%s\n", $header[$i]); Why is this syntax supported? The filehandle inside the parentheses looks very weird. This: printf wow ("%s\n", $header[$i]); looks much better (and happens to already work). And why are you allowed to indirectly create filehandles that you can't use literally? open("!stunky!fluff!", "wow"); $x = "!stunky!fluff!"; print <$x>; If you say print <"!stunky!fluff!">; you get globbing instead (and an "Event not found" from csh). And why aren't filehandles syntactically distinguished, like other user objects? metaconfig 2.0 uses the filehandle 'package', which broke when Perl introduced the 'package' keyword. You could just use indirect filehandles all the time, but that feels blecch. People seem to confuse the syntax with a filehandle object; if it were a filehandle object, you'd say things like: open , "> wow"; = ("hello", ", world\n"); = ; = sprintf "%x\n", 169845242; close ; Offhand, I can't think of anything that this would break, but then, I'm not Not Just Another Perl Hacker. Just random banging on the wall, -- Felix Lee flee@shire.cs.psu.edu *!psuvax1!flee