W
woodenbicycle
I hit a snag and am lost. Here is a piece of a testcase of what I'm
tyring to do:
$catalog{$title}{"genre"} = "Romance";
$catalog{$title}{"rating"} = "PG-13";
my @tempkeywordlist = ("Paris","Sailboats,"Summer");
@catalog{$title}{"keywords"} = @tempkeywordlist;
....
### @tempkeywordlist is later destroyed/overwritten ###
....
my @keywords = @catalog{$title}{"keywords"};
foreach (@keywords){print("Keyword: $_ \n");}
Obviously this isn't working. I have tried various combinations of ways
to put the array into the hash, and later copy it out, but have had no
success. I tried using the square brackets, but that only gave me a
reference that I was unable to make use of. I tried using
$catalog{$title{"keywords"} but it only gave me the size of the array,
not the array itself. Help!
tyring to do:
$catalog{$title}{"genre"} = "Romance";
$catalog{$title}{"rating"} = "PG-13";
my @tempkeywordlist = ("Paris","Sailboats,"Summer");
@catalog{$title}{"keywords"} = @tempkeywordlist;
....
### @tempkeywordlist is later destroyed/overwritten ###
....
my @keywords = @catalog{$title}{"keywords"};
foreach (@keywords){print("Keyword: $_ \n");}
Obviously this isn't working. I have tried various combinations of ways
to put the array into the hash, and later copy it out, but have had no
success. I tried using the square brackets, but that only gave me a
reference that I was unable to make use of. I tried using
$catalog{$title{"keywords"} but it only gave me the size of the array,
not the array itself. Help!