Hello Abigail!
[EMAIL PROTECTED] (Abigail) wrote in:
> On Fri, Oct 11, 2002 at 02:54:20PM -0400, Bernie Cosell wrote:
>> Write out the digits from 1-9 in order. Then add some plus (+) signs
>> and times (x) signs to the string to make it add up to 2,002. As
>> usual in arithmetic, multiplication is done before addition, and you
>> don't have to put a sign between every 2 digits. The answer is
>> unique.
Here is a solution with the glob:
perl -lwe 'y/x_/*/d, eval == 2002 && print for glob join "{_,+,x}", 1..9'
---
Mtv Europe