in reply to ugly nested if's

You might look at the code in List module providing any, all and none. It sounds to me like you want to get any(@list1) != all(@list2). I haven't really played with it.

The PerlMonk tr/// Advocate

Replies are listed 'Best First'.
Re: Re: ugly nested if's
by eric256 (Parson) on Apr 22, 2004 at 21:19 UTC

    You could certianly use it but it won't work if you care about order. my $inlistAonly = any(@listA) ne any(@listB) That would return any elements of listA that have no corresponding partner in listB and you could do the same in reverse. I'm not sure thats realy what the OP was asking for though.


    ___________
    Eric Hodges