BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
I have one of these on my wall somewhere for about 25 years.
0 1 2 3 4 5 6 7 8 9 A B C D E F 00: ☺ ☻ ♥ ♦ ♣ ♠♫ ☼ 10: â–º â—„ ↕ ‼ ¶ § â–¬ ↨ ↠+‘ ↓ → ↠∟ ↔ â–² â–¼ 20: ! " # $ % & ' ( ) * + , - . / 30: 0 1 2 3 4 5 6 7 8 9 : ; < = > ? 40: @ A B C D E F G H I J K L M N O 50: P Q R S T U V W X Y Z [ \ ] ^ _ 60: ` a b c d e f g h i j k l m n o 70: p q r s t u v w x y z { | } ~ 80: Ç ü é â ä à å ç ê ë è ï î + ì Ä Ã… 90: É æ Æ ô ö ò û ù ÿ Ö Ãœ ¢  +£ Â¥ ₧ Æ’ A0: á à ó ú ñ Ñ ª º ¿ ⌠¬ ½  +¼ ¡ « » B0: â–‘ â–’ â–“ │ ┤ â•¡ â•¢ â• +– â•• â•£ â•‘ â•— â• â•œ �› +â” C0: â”” â”´ ┬ ├ ─ ┼ â•ž â•Ÿ + â•š â•” â•© ╦ ╠╠╬ ╧ D0: ╨ ╤ â•¥ â•™ ╘ â•’ â•“ â• + ╪ ┘ ┌ â–ˆ â–„ â–Œ â– â–€ E0: α ß Γ Ï€ Σ σ µ Ï„ Φ Θ Ω δ â +ˆž φ ε ∩ F0: ≡ ± ≥ ≤ ⌠⌡ ÷ ≈ ° ∠+™ · √ ⿠² â– Â
The Challenge: A perl one-liner to produce the above.
The rules:
- All characters except perl -e'' or perl -e"" count.
- pragmas are not required.
- Text::ASCIITable and similar not allowed.
- Distortions of the first line of chars (as shown) acceptable. -25 for those that avoid it.
- Differences in the glyphs are irrelevant, but must be verifably correct for the given system/font/code page etc.
- Differences due only to different quoting rules will be judges the same. (eg. perl -e'"$var..."' equiv. perl -e"qq[$var...]"
My best is 120 so there should be scope for improvement.
perl -e"@(=0..15,@_=(0..9,A..F),print+(' 'x4,map' '.$_[$_],@(),$/,qq[ @{[map{$_[$;=$_].qq[0: @{[map+chr($;<<4|$_),@(]}$/]}@(]}]" |
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (Golf) Ascii table
by blokhead (Monsignor) on Aug 16, 2003 at 04:48 UTC | |
by antirice (Priest) on Aug 16, 2003 at 05:12 UTC | |
Re: (Golf) Ascii table
by antirice (Priest) on Aug 16, 2003 at 02:00 UTC | |
by chunlou (Curate) on Aug 16, 2003 at 04:40 UTC |
Back to
Seekers of Perl Wisdom