Path: utzoo!dciem!nrcaer!cunews!cognos!alanm From: alanm@cognos.UUCP (Alan Myrvold) Newsgroups: comp.lang.perl Subject: A gripe about catching programming errors in Perl Message-ID: <8974@cognos.UUCP> Date: 25 Oct 90 17:01:03 GMT Reply-To: alanm@cognos.UUCP (Alan Myrvold) Organization: Cognos Inc., Ottawa, Canada Lines: 24 Recently, I wrote a bit of a perl script that looked something like this: open(oct,"< October"); while () { print; } Even though the file October exists, nothing was printed. This is due to my choice of oct as a filehandle, since oct is a built-in function. Why couldn't I have at least gotten a warning during the compile? With perl's big collection of functions, I can't be the only one making mistakes like this. Is it ever proper to use a function name where a file handle is expected? - Alan --- Alan Myrvold 3755 Riverside Dr. uunet!mitel!cunews!cognos!alanm Cognos Incorporated P.O. Box 9707 alanm@cognos.uucp (613) 738-1440 x5530 Ottawa, Ontario CANADA K1G 3Z4