# Using Strawberry Perl 5.18.2
use strict;
use DBM::Deep;
my($dbm,$i,$j,$s,$t);
my(@k);
$dbm=DBM::Deep->new('test.db');
$dbm->{'A'}->{'20150301'}=10; # First quote for A
$dbm->{'A'}->{'20150302'}=11; # First quote for A
$dbm->{'B'}->{'20150301'}=8; # First quote for A
$dbm->{'B'}->{'20150302'}=8.5; # First quote for A
# How to list only subkeys for A?
@k=keys(%$dbm->{'A'}); # ERROR HERE
# ERROR IS: "Using a hash as a reference is deprecated at testkey.pl line 14.
# Type of argument to keys on reference must be unblessed hashref or
# arrayref at testkey line 14."
$i=($#k+1);
print "$i keys for key A\n";
exit; # Main
#############################################################
I tried looking in the docs but didn't see any examples of what I wanted. '
Thank you!
In reply to Trying to find subkeys of a DBM::Deep key by bulrush
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |