byrnejb has asked for the wisdom of the Perl Monks concerning the following question:
What I wish to do for debugging purposes is to dump the actual contents of $self, $args, and $e. I tried the naive approach of using print "$self\n"; but that just gave me this:sub genHTMLTableRow { my $self = shift; my $args = shift; my $e = shift; my $ser = $e->{serial}; my $pem = $ser.'.html'; . . .
I tried to use the map functionCSP=HASH(0x800b1e060)
I clearly do not understand the naming conventions of perl variables as this usage of map causes the error:print map { "Key: $_ has Value:$self{$_}\n" } keys $self;
What is the perl way of displaying the contents of $self, $args, and $e?Global symbol "%self" requires explicit package name (did you forget + to declare "my %self"?) at /root/bin/rcsp/blib/lib/CSP.pm line 861
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dump the key value pairs in a hash
by choroba (Cardinal) on Oct 22, 2021 at 20:21 UTC | |
|
Re: Dump the key value pairs in a hash
by haj (Vicar) on Oct 22, 2021 at 20:27 UTC | |
|
Re: Dump the key value pairs in a hash
by Anonymous Monk on Oct 22, 2021 at 20:19 UTC | |
|
Re: Dump the key value pairs in a hash
by karlgoethebier (Abbot) on Oct 23, 2021 at 10:17 UTC |