in reply to Knapsack problem

You might want to look at this demo: piclaydemo It's java source is available, maybe you could reverse engineer it, and convert it to Perl. (Don't forget to post it here if you succeed :-)).