Help for this page

Select Code to Download


  1. or download this
    open my $fh, '<', 'theFile' or die $!;
    
    ...
        ++$count while m[the]g;
    }
    print "'the' appeared $count times in 'theFile'";
    
  2. or download this
    if( $extract =~/^\( (\d.+) \)$/ ) {
        print "The number was $1";
    ...
    else {
        print "The regex didn't match";
    }