Temptation: declare logical like this:
sub logical ($)
Then you could say:
print logical $struct, "\n";
continued...