Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!philmtl!atha!aunro!alberta!oha!tony From: tony@oha.UUCP (Tony Olekshy) Newsgroups: comp.lang.perl Subject: Re: Silent Bomb Summary: A fairly clean alternative. Message-ID: <409@oha.UUCP> Date: 17 Mar 90 18:31:49 GMT References: <11238@deimos.ADS.COM> <7997@ogicse.ogi.edu> Reply-To: tony@oha.UUCP Organization: Olekshy Hoover & Associates Ltd., Edmonton, Alberta, Canada. Lines: 18 In-Reply-To: Message <7997@ogicse.ogi.edu> dated 14 Mar 90 18:43:16 GMT Return-Path: In message <7997@ogicse.ogi.edu>, hakanson@ogicse.ogi.edu (Marion Hakanson) writes: > My current approach, though verbose, works > well and prints meaningful messages: > > unless ( do 'sub.pl' ) { > die "$@aborted" if $@; > die "Cannot load sub.pl: $!, aborted"; > } > > I'm sure someone will convert it to a one-liner.... Yes, many have, but I have been doing it this way too: do ($_="somefile.pl") || die "$0: can't load $_:\n".($@?$@:$!); -- Yours, etc., Tony Olekshy (...!alberta!oha!tony or tony@oha.UUCP).