Temptation: declare logical like this:
sub logical ($)
so you can say
print logical $struct, "\n";
Don't do this, because then this won't work:
print logical $struct1, $struct2, "\n"
Instead, fix logical to handle multiple arguments and to return plain strings unchanged.