LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-10-2000, 11:37 PM   #1
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 12,683

Rep: Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418
Post


For those of you interested in Perl this is pretty interesting stuff. Some of it is really amazing. If you are interested more info is available at http://www.itknowledge.com/tpj/obfusc-5.html. To give you an idea of what is involved this is last years winner in catagory 4 - Print "The Perl Journal" in 256 characters or less.

Code:
#!/usr/bin/perl -l

print ocr(<<TPJ);
 #  # # ## ##  ## ##  #    #  #  # # ##  #  #  #  #
### # # #  # # #  # # #    # # # # # # # ## # # # #
 #  ### ## ##  ## ##  #    # # # # # ##  # ## ### #
 #  # # #  #   #  # # #  # # # # # # # # #  # # # #
 #  # # ## #   ## # # ## ###  #  ### # # #  # # # ##
TPJ

sub ocr{@{$-[$@++]}=split$,for(split'\n',shift);for$@(0..4){for(0..51){++$_{$_
 }if($-[$@][$_]=~$")}}@&=(-1);for(sort{$a<=>$b}keys%_){push@&,$_ if($_{$_}>4)
  }push@&,52;for$@(0..13){@{$|[$@][$_]}=@{$-[$_]}[$&[$@]+1..$&[$@+1]-1]for(0..
   4)}for(@|){**=$_;$w=@{$*[$^=$$=0]}-1;for$@(0..4){for(1..$w){$^++if$*[$@][$_
    ]ne$*[$@][$_-1]}}for(0..$w){for$@(1..4){$$++ if$*[$@][$_]ne$*[$@-1][$_]}}
     for(0..20){push@},chr$_+65if(7*(8,4,2,9,2,3,7,8,1,$@,5,4,9,10,10,6,3,8,4,
      8,8)[$_]+(5,8,3,3,4,2,1,2,8,2,7,1,5,4,6,$@,3,6,8,4,1)[$_]==7*$^+$$)}}@}}
 
Old 08-11-2000, 12:17 AM   #2
bickford
Member
 
Registered: Jun 2000
Location: SUNY Buffalo
Posts: 79

Rep: Reputation: 15
Maybe i'm not just looking at it right but I don't see those words, just a bunch of #'s. =) Anyways I think Perl is the perfect language to hold such a competition. Too many of those RE expressions in a row is quite fiendish!
 
Old 08-11-2000, 07:04 AM   #3
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 12,683

Original Poster
Rep: Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418
Some would say that Perl is obfuscated to begin with. I think that Perl is usually quite readable, although some regexs do get pretty nasty.
BTW, The code doesn't print the #'s, it prints "THEPERLJOURNAL".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hari's Little Contest#1: Linux Troll Essay Contest vharishankar General 32 07-01-2006 12:52 AM
Installing on the 5th partition Jongi Mandriva 4 11-26-2005 08:03 AM
CDROM problems....like the 5th time i joker20 Linux - Newbie 4 09-19-2004 01:59 PM
5th IDE device or SCSI CD-RW? star geezer Linux - Hardware 1 11-17-2003 09:56 AM
Fifth Annual Obfuscated Perl Contest Winners Announced jeremy Programming 0 11-16-2000 02:57 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration