Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 ( [id://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;

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-20 01:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found