in reply to When a PERL Hacker Retires

Argh! I'm getting some negative rep on this.

Is this for lack of elegance (fair enough), insuffient obscurity (fair enough) or because it doesn't work for you? jynx complained that it printed garbage.

On my MacPerl, it produces the following output. I did wonder whether whether there might be some cross-platform issues regarding the line endings.

r J u e s k __ t /| c / / / a / A / / H * n | | | o \|/ L t R h E e P r

Replies are listed 'Best First'.
Re: Re: When a PERL Hacker Retires
by blakem (Monsignor) on Oct 11, 2001 at 12:53 UTC
    Ah, that explains it... Here is a patched version that works for me on unix.
    @d=(17,103,24, 63,31,106,32,2,45, 90,70, 104,71,2,72,2,81, 96,103,84,104, 84,115,105, 116,2,148,36, 149,113,150, 2,156,88,181, 36,182,2,212 ,36,213,2,242 , 36,243,2,247, 86,271,36,291 ,54,292,2,319, 36,320,2,346,36 ,347,2,350,61, 372,31,396,99,397,2,422,113,423 ,2,448,113,449,2,474,113,497 ,100,498,2,522,81,523,113 ,524,36,525,2,526,2 ,531,65,572,105, 573,2,574, 2,575,2, 583,71,618,93, 619,2,620,2,634, 58,659,90,660,2, 681,69,692,103);for(;$i <=$#d;$i+= 2 ){$c[$d[ $i]]=$d[$i+1]}foreach$c (@c) {if($c){$c+=$c==2?8:11} else{$c=32}print chr($c)} # WHEN A PERL HACKER RETIRES #
    notice the slight munging in the second to last line of code... It now prints chr(10) instead of chr(13)

    -Blake

      Doh! Thanks blakem. Now that just leaves Windows folk out in the cold.

      I really should have known better than to use chr for a line ending - even it was 3am when I was coding it.
        Nope! It looks pretty much the same on Windows. Nice work! Too bad you can't color the text to be gold. ;-)
        Actually if you're using Active Perl (and I think Indigo as well, perhaps any Win32 build?) "\n" in outuput is automagically translated to \n\r. Of course you might go ahead just do chr(10).chr(13)...