sub print_results { if (@_ == 0) { print "This data structure is a scalar"; } else { if ($_[0] eq 'array') { print "This data structure is an array"; } else { print "This data structure is a hash"; } shift; for (@_) { if ($_ eq 'hash') { print ' of hashes'; } elsif ($_ eq 'array') { print ' of arrays'; } } } print "!\n"; }