Help for this page

Select Code to Download


  1. or download this
    given($foo) {
        when (/x/) { say '$foo contains an x'; continue }
        when (/y/) { say '$foo contains a y' }
        default    { say '$foo contains neither an x nor a y' }
    }
    
  2. or download this
    #!/usr/local/bin/perl
    
    use feature qw{ switch };
    ...
    match 3;
    match 4;
    match 5;
    
  3. or download this
    1:
    2:
    3:
    4:
    5:
    
  4. or download this
    #include <stdio.h>
    #include <stdlib.h>
    ...
    
        exit( 0 );
    }
    
  5. or download this
    1: 4
    2:
    3:
    4:
    5:
    
  6. or download this
    #!/usr/local/bin/perl
    
    use feature qw{ switch };
    ...
    
    match 'Just another Perl hacker';
    match 'Just another Perl slacker';
    
  7. or download this
    Just another Perl hacker: Me too!
    Just another Perl slacker:
    
  8. or download this
    $foo contains an x
    $foo contains neither an x nor a y