Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!samsung!think!snorkelwacker!bloom-beacon!ccount From: ccount@athena.mit.edu (Craig A Counterman) Newsgroups: comp.lang.perl Subject: print @ar; bug or feature Message-ID: <1990Jun7.031545.27669@athena.mit.edu> Date: 7 Jun 90 03:15:45 GMT Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 15 Is this a bug? It doesn't matter much to me, but someone pointed it out, an now I really would like to know why this is so. perl -e '$ar[0] = 3;$ar[3] = 5;$\="\n";print @ar;print "@ar";' prints "33 5". Why? It prints @ar only till it hits an undefined element, but interpolating the @ar in a string constant works as it should. print @ar also fails to print the newline. It looks like 'print @ar' is at some point expanding to "3\000\000\0005\n", and only the part till the first nul is being printed. Curiously, Craig