$foreigner{abdul} = 1; $foreigner{marcus} = 1; $spouse{edward} = "sally"; $spouse{sally} = "edward"; $spouse{bill} = "hillary"; $spouse{hillary} = "bill"; $gross_income{hillary} = 100_000; $gross_income{edward} = 20_000; $gross_income{bill} = 30_000; $gross_income{marcus} = 49_999; $gross_income{mary} = 35_000; sub average_taxpayer {my $Person = @_ ? shift : $_; !$foreigner{$Person} and not ($spouse = $spouse{$Person} and $income1 = $gross_income{$spouse} and $income1 > 30_000) and $income2 = $gross_income{$Person} and $income2 < 50_000 }