Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!cernvax!chx400!chx400!sicsun!sic!brossard From: brossard@sic.epfl.ch (Alain Brossard EPFL-SIC/SII) Newsgroups: comp.lang.perl Subject: print ; Message-ID: <1268@sicsun.epfl.ch> Date: 7 Apr 91 10:14:19 GMT Sender: news@sicsun.epfl.ch Lines: 35 There is a feature which has just bitten me and made me lose a lot of hours and I think the man page should reflect this. When doing: print NEW ; It not only prints the next line of FILE as I wanted but prints all the rest of FILE. There is a paragraph in the 4.000 man page which relates to this (I think): If a is used in a context that is looking for an array, an array consisting of all the input lines is returned, one line per array element. It's easy to make a LARGE data space this way, so use with care. At least that is what I think it says, this is what I would call a feature in the bad sense of the word! Isn't Perl cryptic enough? Anyway I suggest adding: print ; in the paragraph that says that all the following are equivalent: while ($_ = ) { print; } while () { print; } for (;;) { print; } print while $_ = ; print while ; I wanted to do print $_, , ; and I had to do: print $_ = ; print $_ = ; The fact that I need to do an assignment seems counter intuitive! Alain Brossard