Help for this page

Select Code to Download


  1. or download this
    my $s=',,,,';
    @nCommas=($s=~/,/g);
    $nCommas=@nCommas;
    print "$nCommas\n";   # prints 4
    
  2. or download this
    my $s=',,,,';
    $nCommas=($s=~/,/g);
    print "$nCommas\n";   # prints 1