in reply to creating word from array of array
I have to admit it - Damian Conway changed the way I now look at cartesian products. I haven't exactly understood yet why a join "", @states does not work instead of the foreach, but this is how I'd now attack that problem - manually implementing recursion is so 20th century !
#!/usr/bin/perl -w use strict; use Quantum::Superpositions; my @characters = ( [ "h" ], [ "e" ], [ "l", "p", "i" ], [ "l" ], [ "o" ], ); # build up our Quantum Mechanics Automaton my @states = map { any(@$_) } @characters; # And print out all possibilities my $string = ""; $string .= $_ foreach @states; print join(",",eigenstates($string));
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
|
|---|