We Recommend

Learning Perl Learning Perl
In this smooth, carefully paced course, a leading Perl trainer teaches you to program in the language that threatens to make C, sed, awk, and the Unix shell obsolete for many tasks. This book is the "official" guide for both formal (classroom) and informal learning. It is fully accessible to the novice programmer.


Posted By

darkphotn on 01/13/08


Tagged

code perl crazy elite wtf


Versions (?)


Crazy Perl Code


Published in: Perl 


Yes, this is valid code.

Designed by myself, unless otherwise noted.

  1. $_ = shift;
  2. s/\\/\//g;
  3.  
  4. ################
  5.  
  6. while(<>) {
  7. /^(\w+)/;
  8. print $_.',';
  9. }
  10.  
  11. #############
  12.  
  13. if(($_ = 5)==5) {print;}
  14.  
  15. ##############
  16.  
  17. $x = 7;
  18. if (($x <=> 0)==($x=$x)) {print 'true';}
  19. else{print 'false';}
  20.  
  21. #######################
  22.  
  23. print "Hello World" or die "trying";
  24.  
  25. ######################
  26.  

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: jkramer on January 30, 2008

What's so crazy about this?

You need to login to post a comment.