Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Silent Bomb Message-ID: <7418@jpl-devvax.JPL.NASA.GOV> Date: 14 Mar 90 22:47:58 GMT References: <11238@deimos.ADS.COM> <7997@ogicse.ogi.edu> <8005@ogicse.ogi.edu> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 19 In article <8005@ogicse.ogi.edu> schaefer@ogicse.ogi.edu (Barton E. Schaefer) writes: : How about : : do 'sub.pl' || ($@ ne "" && die "$@aborted") || die "Can't load sub.pl: $!"; : : Now the only thing I can't figure out is why the parentheses are necessary. : Doesn't && "bind tighter" than || ? If not, why not? I thought this was : supposed to act like C ... Remember that die is a LIST operator, and that LIST operators gobble up all arguments to their right. You can do what you want if you say do 'sub.pl' || $@ ne "" && die("$@aborted") || die "Can't load sub.pl: $!"; Though I'd probably say that as do 'sub.pl' || die $@ ? "$@aborted" : "Can't load sub.pl: $!"; Larry