Path: utzoo!attcan!uunet!mcsun!hp4nl!ruuinf!henkp From: henkp@ruuinf.cs.ruu.nl (Henk P. Penning) Newsgroups: comp.lang.perl Subject: bug, feature, or what ?? Message-ID: <4138@ruuinf.cs.ruu.nl> Date: 29 Oct 90 21:23:34 GMT Organization: Utrecht University, Dept. of CS Lines: 41 # Why is it that: @row = 1..8 ; print join(',',@row), ".\n" ; $#row = 3 ; print join(',',@row), ".\n" ; splice(@row,0,4) ; print join(',',@row), ".\n" ; $#row += 4 ; print join(',',@row), ".\n" ; # prints out: # 1,2,3,4,5,6,7,8. # 1,2,3,4. # . # ,,,. # instead of: # 1,2,3,4,5,6,7,8. # 1,2,3,4. # . # 5,6,7,8. # Empty arrays can sometimes be (re-)extended, see fi: @row = 1..8 ; print join(',',@row), ".\n" ; $#row = -1 ; print join(',',@row), ".\n" ; $#row = 7 ; print join(',',@row), ".\n" ; # prints out: # 1,2,3,4,5,6,7,8. # . # 1,2,3,4,5,6,7,8. __END__ Can I see through this mistery with the knowledge of 'The Book' ? I couldn't find it in the One True Man Page. === HenkP === -- Henk P. Penning, Dept of Computer Science, Utrecht University. Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. Telephone: +31-30-534106 e-mail : henkp@cs.ruu.nl (uucp to hp4nl!ruuinf!henkp)