in reply to Handling weird return values with or die

not system("zip -rq $target $project_root") or die "couldn't exec zip: $!"; reduces to die "couldn't exec zip: $!" if system ("zip -rq $target $project_root"); Might as well reduce the two keywords "not" and "or" to just one "if".

Replies are listed 'Best First'.
Re: Re: Handling weird return values with or die
by BrentDax (Hermit) on Jul 07, 2001 at 03:50 UTC
    Except that breaks the principle of "put the most important thing first." if(system("whatever")) { die "whatever else" } doesn't, however...

    =cut
    --Brent Dax

    @HPAJ=split("", "rekcaH lreP rentonA tsuJ"); print reverse @HPAJ; #sucky but who cares?