First, thanks to moklevat for coining the term and to SuicideJunkie for inventing the challenge or at least a similar one (in the ChatterBox, earlier today).

I then created a Perl script that prints "Just another Perl hacker" without using any character more than once in the script. To win at "flog", you need to create the longest Perl script (most characters) that prints "Just another Perl hacker,\n" and also doesn't use any character more than once (I added the comma for tradition and the newline for other reasons).

Since there is no prize, I won't declare a "winner". So here are some suggestions for how to impress your audience:

Here's an example of a script that almost never uses the same character twice (it uses two double quotes and prints the wrong thing), in case the concept is unclear:

warn"JustANoTHe' PERL-hick,\012";

And here is a script to double-check that you haven't used a character twice in your script:

local( $/ ); $f{$_}++ for <> =~ /./gs; for( sort keys %f ) { warn "$f{$_} ($_)s!\n" if 1 != $f{$_}; print $_; }

Below is the version I posted to the CB for those who missed it and want to avoid the extra challenge of having no starting point to bias them:

print aADEFHIGJLKBObVQPSRXUTCW^q[+471f)'(>$.0o23#<s:96?&%]

- tye        

Replies are listed 'Best First'.
Re: "JAPH flog", the opposite of "golf"
by kyle (Abbot) on Dec 15, 2007 at 04:38 UTC

    It seems to me that every solution is the same length. Do what you need to do, then add a noop with the characters you haven't used. With apologies to tye:

    print aADEFHIGJLKBObVQPSRXUTCW^q[+471f)'(>$.0o23#<s:96?&%];m{|~\@=_`!* +,-/"58cdeghjkluvwxyzMN}

    That's all 94 printable characters.

    Update expanding a little:

    print aADEFHIGJLKBObVQPSRXUTCWlj^q[+471f)'(>$.0o23#<s:96?&%@`]; m{|~\=_!*,-/"58cdeghkuvwxyzMN}

    It's the same characters (plus newline), but it now outputs ",\n" at the end.

Re: "JAPH flog", the opposite of "golf"
by jdporter (Paladin) on Dec 15, 2007 at 13:39 UTC