Help for this page

Select Code to Download


  1. or download this
    my $ok = 1;       # set private variable $ok = 1
    $str =~ m/(.)(.)(??{ $ok = 0 if $2 lt $1; 0 })/;
    
  2. or download this
    my $ok = 1;
    local *myok = \$ok;    # Needed to avoid closure in code assertion.
    $str =~ m/(.)(.)(??{ $myok = 0 if $2 lt $1; 0 })/;