in reply to What are YOUR friends listening to?

Hi Alivac,

It looks nice for me, and is for sure a very good use for perl. But, usually, at least in my case, I already know most of the music my friends listen.

So, When I saw your code my first thought was... Can I use this to check what my neighbours are listening to? My neighbours are those people who listen to many of the musics I listen more, so probably I'll like most music they listen also. But as they are completly unknow to me, probably they know other things I still don't know.

So, I made a small change in your script, to make it possible to pass another param to specify that I want friends or neighbours. Here is the diff:
65c65,66 < Param('mode|m')->default('text') --- > Param('mode|m')->default('text'), > Param('info|i')->defau +lt('friends'), 71a73 > my $info = $opt->get_info(); 74c76,79 < my $content = get("http://ws.audioscrobbler.com/1.0/user/${user}/fri +ends.xml"); --- > my $feed=$info eq 'neighbours' > ?"http://ws.audioscrobbler.com/1.0/user/${user}/neighb +ours.xml" > :"http://ws.audioscrobbler.com/1.0/user/${user}/friend +s.xml"; > my $content = get($feed);
Congratulation. A very nice use for perl.