in reply to How can I fix the problem in using the Algorithm::Permute module?

You almost had it. You just need to add brackets and declare @res:
#!/usr/bin/perl -l use strict; use warnings; use Algorithm::Permute; my(@arr) = qw/A B C/; my $p = new Algorithm::Permute([@arr], 2); while (my(@res) = $p->next) { do { print join(", ", @res); }; } exit 0;

Replies are listed 'Best First'.
Re^2: How can I fix the problem in using the Algorithm::Permute module?
by supriyoch_2008 (Monk) on Feb 27, 2013 at 09:02 UTC

    Hi Khen1950fx,

    Thank you very much for prompt reply. The code has worked and solved my problem. Sometimes I feel that the Perlmonks are very helpful and try to sort out the problems of the person like me who has no formal training in computer or its languages. This is highly appreciable.

    With deep Regards