Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Happy 2006

by Aristotle (Chancellor)
on Jan 13, 2006 at 01:42 UTC ( [id://522863]=note: print w/replies, xml ) Need Help??


in reply to Happy 2006

use strict; use warnings; use Set::CrossProduct; my @ops = qw( * + - / ); my $expr = '2006 == ' . join ' %s ', 1 .. 9; my $xp = Set::CrossProduct->new( [ map \@ops, $expr =~ /%s/g ] ); while( my @attempt = $xp->get ) { my $attempt = sprintf $expr, @attempt; print $attempt, "\n" if eval $attempt; }

Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found