sub my_describe { my $s = Dumper(@_); $s =~ s/\'[^\']*\'//g; # eliminate scalars $s =~ s/[^\[\{\'\\]//g; # cut to the heart of the structure # + because we only care about one member of hashes/arrays $s =~ s/\[+/Ao/g; $s =~ s/\{+/Ho/g; $s =~ s/\\+/r/g; return $s . "S"; }