in reply to Relational textfile?

I don't wan't to discourage you from using DBI, but if you wanted an alternative, and there isn't too much data, you could try reading in the data as a sort of pseudo-bitfield (untested and I've only just woken up...):
while (<IN>) { ($name, @fields) = split '|'; for (0..5) { $value += 2**$_ if $fields[$_] } $people{$name} = $value; } # People with fields 0 and 3 but nothing else for (keys %people) { print if $people{$_} ^ 58; }