Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!mhres!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.lang.perl Subject: @array in scalar context Message-ID: Date: 24 Feb 90 20:45:08 GMT Sender: jv@mhres.mh.nl Distribution: comp Organization: Multihouse Gouda, the Netherlands Lines: 16 This has bitten me a few times. Is it defined that a scalar reference to an @array yields its last element? Most notably: "if @array" depends on the last element of @array being zero or not, while I would have expected it to be equivalent to "$#array >= $[" . Johan -- Johan Vromans jv@mh.nl via internet backbones Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62944/62500 ------------------------ "Arms are made for hugging" -------------------------