Help for this page

Select Code to Download


  1. or download this
    # break into individual characters
    my @characters = split(//);
    ...
    while (/(.)/g) { # . is never a newline
         # do something with $1
    }
    
  2. or download this
    my %seen = ();
    my $string = "J. J. Horner is so cool!";
    ...
        $seen{$byte}++;
    }
    print "unique chars are: ", sort(keys %seen), "\n";