Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!sun!amdcad!brahms!dwork From: dwork@brahms.amd.com (Jeff Dwork) Newsgroups: comp.lang.perl Subject: perl man page (bugs and enhancements) Message-ID: <1990Aug13.194249.6156@amd.com> Date: 13 Aug 90 19:42:49 GMT Sender: usenet@amd.com (NNTP Posting) Organization: Advanced Micro Devices; Sunnyvale, CA Lines: 54 Two man page bugs: > splice(ARRAY,OFFSET) > > push(@a,$x,$y) splice(@a,$#x+1,0,$x,$y) Shouldn't that be `$#a'? > > As mentioned earlier, if any list operator (print, etc.) or > any unary operator (chdir, etc.) is followed by a left > parenthesis as the next token on the same line, the operator > and arguments within parentheses are taken to be of highest > precedence, just like a normal function call. Examples: > > chdir $foo || die; # (chdir $foo) || die > chdir($foo) || die; # (chdir $foo) || die > chdir ($foo) || die; # (chdir $foo) || die > chdir +($foo) || die; # (chdir $foo) || die > > but, because * is higher precedence than ||: > > chdir $foo * 20; # chdir ($foo * 20) > chdir($foo) * 20; # (chdir $foo) * 20 > chdir ($foo) * 20; # (chdir $foo) * 20 > chdir +($foo) * 20; # chdir ($foo * 20) Shouldn't it read: but, because * is higher precedence than +: Or am I missing something here? Version is: $Header: perly.c,v 3.0.1.5 90/03/27 16:20:57 lwall Locked $ Patch level: 18 Two requests: The man page lists only operators that differ from those in C. Many of our users (and potential users) do little or no C programming. How about adding the rest of the operators to the man page? The section on regular expressions requires one to also read the regexp routine documentation. Could the relevant sections of regexp(3) be included in this section? These additions would, IMHO, make the man page a better reference for the novice/infrequent user of perl. -- Jeff Dwork | 408-749-2356 | dwork@AMD.COM Advanced Micro Devices, M/S 45 |--------------------------------------- PO Box 3453 | The above opionions are mine, Sunnyvale, Ca 94088 | not AMD's.