... \$foo -> oS ...which doesn't seem quite right.
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"; }
In reply to Re: Checking whether two variables have the same structure
by hossman
in thread Checking whether two variables have the same structure
by Corion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |