Help for this page

Select Code to Download


  1. or download this
    my $count = $string =~ tr/;/;/
    
  2. or download this
    my $count = $string =~ tr/;//
    
  3. or download this
    # my $count = $_ =~ tr/;//   # same thing
    my $count = tr/;//
    
  4. or download this
    my $count = 0;
    
    ...
        {
        $count += tr/;//
        }
    
  5. or download this
    my $count = 0;
    
    ...
        {
        $count += my @cities = split /;/;
        }