Help for this page

Select Code to Download


  1. or download this
    my $s = 'fileCapaber';
    my $count = () = $s =~ m[(a|b|c)]gi;
    print $count;
    
    4
    
  2. or download this
    print 'Found: ', scalar( () = $s =~ m/($_)/ig), "'${_}'s\n" for qw[a b
    + c]
    
    Found:  2 'a's
    Found:  1 'b's
    Found:  1 'c's