jmo has asked for the wisdom of the Perl Monks concerning the following question:
If I omit the if and only does:perl -w -e 'use strict;my $t; if (scalar (keys %{$t->{r}})) {print "There are keys\n";} print "t->{r} = $t->{r}\n"; ' t->{r} = HASH(0x80fbc50)
I get this error:perl -w -e 'use strict;my $t = undef; my %p = %{$t->{r}}; print "t->{r} = $t->{r} "; '
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: does if(%{$ptr->{key}}) define?
by robartes (Priest) on Oct 03, 2002 at 09:08 UTC | |
|
Re: does if(%{$ptr->{key}}) define?
by Juerd (Abbot) on Oct 03, 2002 at 08:23 UTC |