in reply to JAPH with constraints

Does following satisfy all conditions? (71?)

die\*$!~/./.($_=$&,$_++,$_++,++$_).$&x[]=~/./.$&x$^=~/.$/.$&x{}=~/./.$/

Replies are listed 'Best First'.
Re: Re: JAPH with constraints
by locked_user mtve (Deacon) on Jan 05, 2003 at 08:36 UTC

    Uhm, sorry. It was me :) (49)

    die$;!~y//.-~/c.$;.([$^=~/./g]&~$").$&.($;&{}).$/

    69 for truly EBCDIC:

    []=~/./;$;=$_=$&;$;++for$^F..ord$/;die$;.$_.$&x$^=~/.$/.{}!~/./.$&.$/
      The first one is very nice! However, the second one contains the variable $^F, which is not allowed by the constraints.

        Well, that ^F can be hardcoded (, "\006") :) But ok, it isn't (67):

        []=~/./;$;=$_=$&;$;++for$^=~/.$/..~-ord$/;die$;.$_.$&.{}!~/./.$&.$/

        Also, "~" in your solution probably should be "\\" because "~" in EBCDIC is lower than alphanumerics.

        It's very interesting what're other ways to get "J" under such constraints. I found only ">" and "?" pair that is on the same distance (1) in both tables, so maybe "K" can be transliterated to "J".

Re: Re: JAPH with constraints
by Bobinours (Acolyte) on Jan 13, 2003 at 08:12 UTC
    This one is "use strict" and -w flag compliant. Great ! ++