Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    # Shuffles cards
    
  2. or download this
    use strict;
    use warnings;
    
  3. or download this
    sub b {
        push(@pack, shift @pack);
    }
    
  4. or download this
    sub i {
        my ($a, $b, $c, $d, $e, $f, $g, $h) = @pack;
        @pack = ($e, $a, $f, $b, $g, $c, $h, $d);
    ...
        my ($a, $b, $c, $d, $e, $f, $g, $h) = @pack;
        @pack = ($a, $e, $b, $f, $c, $g, $d, $h);
    }
    
  5. or download this
    sub parse {
      my ($string) = @_;
      print "\nParse $string: ";
      
      foreach $offset (0..(length($string)-1)) {
            $char = substr($string, $offset, 1);
    
  6. or download this
    for (string =~ /./g) { # ...
    
  7. or download this
    for (split //, $string) { # ...
    
  8. or download this
    for (/./g) { # ...
    
  9. or download this
    for (split //) { # ...
    
  10. or download this
            if ($char =~ /b|i|o/) {
              print "bio ";
              &{$char};
            }
    
  11. or download this
            elsif ($char =~ /\d/) {
                print "digit ";
    #            foreach (1..$char) { &parse(substr($string, $offset+1)); 
    +}