Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: nested combinations: algorithm advice?

by Pragma (Scribe)
on Sep 23, 2004 at 05:19 UTC ( #393131=note: print w/replies, xml ) Need Help??


in reply to nested combinations: algorithm advice?

#!/usr/bin/perl -lanF_ "@F"=~$r[$_-1]&&print"$.,$_"for 1..@r;$_="{@F}.+{@F}";y/ /,/;push@r,jo +in'|',glob

Replies are listed 'Best First'.
Re^2: nested combinations: algorithm advice?
by Jasper (Chaplain) on Sep 23, 2004 at 09:44 UTC
    #!/usr/bin/perl -lapF_ for$p(@p){$;.="$_ and $p "if 1<grep"@F"=~$_,split/_/,$p}push@p,$_}{$_=$
      What?! No glob? Bah! Ameteur... :-)

      ps. I believe you are missing a semicolon.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2019-11-20 22:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (103 votes). Check out past polls.

    Notices?