Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!jarthur!usc!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!uvaarpa!mmdf From: worley@compass.com (Dale Worley) Newsgroups: comp.lang.perl Subject: perl man page (bugs and enhancements) - yet another opinion Message-ID: <1990Aug16.145138.22782@uvaarpa.Virginia.EDU> Date: 16 Aug 90 14:51:38 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: worley@compass.com Organization: The Internet Lines: 25 The manual reads: 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 the first one have the comment "because chdir is higher precedence than ||", and the second "because * is higher precedence than chdir"? To the naive, it's not immediately obvious why "chdir $foo || die" is parsed differently than "chdir $f00 * 20". Dale Worley Compass, Inc. worley@compass.com -- Captain's Log, Star-date 6701.9: The weather is fine. Beam down Yeoman Rand and a six-pack.