#!/usr/bin/perl open (X,$0);X([<X>]);sub X{$x=shift;print pack("C*", map{s|X|**|g;s|x|*|g;eval;}(split(/\|/,join("", map{s|\#||;eval}(grep/x/,(grep/^\#/,@$x))))));} #$x="2x37|13x3X2|23x5|29x2X2|2X5|5x13|5x2x11|3x37|29x2X2|13x2X3|101|19 +x3x2"; #$x="|2X5|2X4x5|101|19x3x2|3X3x2X2|2X5|2X3x3X2|97|3X2x11|107|101|19x3x +2";

Replies are listed 'Best First'.
Re: 1st Japh
by mpennucci (Monk) on Mar 04, 2002 at 15:36 UTC
    I like it a lot, but I think that the last line should be
    #$x="|2X5|2X4x5|101|19x3x2|3X3x2X2|2X5|2X3x3X2|97|3X2x11|107|101|19x3x +2";
    (You transposed the first 5 and '|')

    Very nice job though (++)
    Mike
      Heck, you are right! I was just trying to even out the two $x lines -- ended up messing up my space! Fixing it, though, and thanks for the nice comments.