home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!mach.cs.cmu.edu!jfriedl
- From: jfriedl+@cs.cmu.edu (Jeffrey Friedl)
- Subject: Defined behavior?
- Message-ID: <BszuD5.515.1@cs.cmu.edu>
- Sender: news@cs.cmu.edu (Usenet News System)
- Nntp-Posting-Host: ernst.mach.cs.cmu.edu
- Reply-To: jfriedl@cs.cmu.edu
- Organization: Carnegie Mellon / Omron Corporation
- Date: Fri, 14 Aug 1992 21:58:08 GMT
- Lines: 20
-
- Excuse the pun, but is the following defined behavior?
-
- The two-line program
- $foo = 1; defined($foo,$foo);
- print $foo;
- when executed with 'perl -w' (v4.035) produces
- Use of uninitialized variable at file line 2.
-
- It seems that the odd usage of 'defined' (having more than one "argument")
- undefines the "arguments" (I'm guess they're not really arguments, but
- expressoins linked by the comma operator).
-
- I stumbled across this due to some dyslexic typing on my part.
-
- Thanks,
- *jeff*
- -------------------------------------------------------------------------
- Jeffrey Eric Francis Friedl jfriedl@cs.cmu.edu -or- jfriedl@omron.co.jp
- Omron Corporation, Section RZE, Shimokaiinji, Nagaokakyo Kyoto 617, Japan
- Visiting researcher to the Mach Project, Carnegie Mellon University
-