Posted By

Enaku on 01/06/11


Tagged


Versions (?)

I hate the world


 / Published in: Perl
 

  1. use strict;
  2. use warnings;
  3.  
  4. use Switch;
  5.  
  6. my $test = test("pants");
  7. my $outher = other("fuck");
  8.  
  9. print $test;
  10. print $outher;
  11.  
  12. sub test {
  13.  
  14. switch($_) {
  15.  
  16. case("pants") {
  17. return "FUCK\n";
  18.  
  19. }
  20. }
  21. }
  22.  
  23. sub other {
  24. return $_[0];
  25. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: chorny on January 13, 2011

why deprecated Switch.pm and not given/when?

You need to login to post a comment.