Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Keep It Simple, Stupid
 
PerlMonks  

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

by Khen1950fx (Canon)
on Feb 27, 2013 at 08:13 UTC ( #1020818=note: print w/ replies, xml ) Need Help??


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;


Comment on Re: How can I fix the problem in using the Algorithm::Permute module?
Select or Download Code
Re^2: How can I fix the problem in using the Algorithm::Permute module?
by supriyoch_2008 (Scribe) 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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1020818]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-04-20 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls