in reply to Re: Bad ascii art
in thread Bad ascii art

Thanks for the suggestions - and for not slagging off my code too much!

I like your changes, although I can't get them to work. I notice you have q{{ which I fixed to q{}, also you need to escape the + in the substitution regex. But now all I get is a long line of mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm !

I'll keep looking, hopefully I will learn something by fixing it! Thanks again.

Update: Also need to escape the $= in the right hand side of the substitution... which gives the result:

mmmmmmmmmmmmmmmmmsssunppprtfgggirrrrssssssskkkkkiiiiiiiiihhhhhhhhhhhh

which has all the right letters (in the right order) but a "few" extra ones!

s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&;

Replies are listed 'Best First'.
Re^3: Bad ascii art
by perldeveloper (Scribe) on Aug 27, 2004 at 08:58 UTC
    Well, I hope I'll make it up to you with this adaptation, which I did test on Perl. It's a bit more obscure than what I originally suggested -- yet still same principles.
    $=+=49;$;= q; .;; m; | ;?49:s|\+\|-|\$=$&$&|? eval:$;=~s;.$;$=$&$&;for split//,q; / ++++++ ++o-------=++ ++ ++_--------------<+ ++,+++++++++ +/ -------- -- -/;; $_=$;;s;..$;;;print eval;
    I left the ascii art to you.
Re^3: Bad ascii art
by muntfish (Chaplain) on Aug 26, 2004 at 15:05 UTC

    OK, it's the m?? that is upsetting it. White space is not being filtered. The following works - but I'm going to start again to find a more obscure way of generating the characters...

    $==109;for(split//,q{ / ++++++ ++o-------=++ ++ ++_--------------<+ ++,+++++++++ +/ -------- -- -/ }){m^\s^?():s:-|\+:\$=$&$&:?eval:print chr($=)}
    s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&;