in reply to help a Dutchman with hash

I gave this a try but had no luck. Here's what I did:
#!/usr/bin/perl use strict; use warnings; use diagnostics; use Data::Dumper; use IMDB::Film; my $imdbObj = new IMDB::Film(crit => 'Casablanca'); my $recommendations = $imdbObj->recommendation_movies(); # Attempt to print out values from recommendation_movies() my %recommendations; print map { "$_ => $recommendations{$_}\n" } values %recommendatio +ns; ## Doesn't return anything ## # Debugging to see what's in recommendation_movies() $imdbObj->status ? print "$recommendations\n" . Dumper($recommendations) . "$imdbObj->recommendation_movies()\n" . Dumper($imdbObj->recommendation_movies()) : print "ERROR: $imdbObj->error"; __END__ RETURNS: HASH(0x100a385a8) $VAR1 = {}; IMDB::Film=HASH(0x100805140)->recommendation_movies() $VAR1 = {};
I checked the IMDB::Film source code for recommendation_movies()
recommendation_movies() Return a list of recommended movies for specified one as a has +h where each key is a movie ID in IMDB and value - movie's title +: $recommendation_movies = $film->recommendation_movies( +); For example, the list of recommended movies for Troy will be s +imilar to that: __DATA__ $VAR1 = { + + '0416449' => '300', + + '0167260' => 'The Lord of the Rings: The Return of t +he King', + '0442933' => 'Beowulf', + + '0320661' => 'Kingdom of Heaven', + + '0172495' => 'Gladiator' + + };

I tried printing  $recommendation_movies but got an 'ERROR: Can't call method "$recommendation_movies" on an undefined value'

Sorry but that's as far as I got. Hopefully some of this information will help you (or help someone help you) get a little closer to solving the problem.

*Quick side note: You may want to change the title of your post to something like: "Print Hash Values From IMDB::Film". Although your title is funny, it doesn't really do very much for your question. You'll have more luck getting monks to view your post with something that clearly and succinctly describes your problem.

Good luck! It's a fun module ( for me at least :) ) thanks for posting the question.
Luis

"...the adversities born of well-placed thoughts should be considered mercies rather than misfortunes." — Don Quixote