Help for this page

Select Code to Download


  1. or download this
    my($grant,$db,$schema,$user,$scope) = $results[0] =~ m/.*GRANT\s(.+)\s
    +ON\s(.+)\.(.+)\sTO\s(\S+)\@(\S+)/ix;
    if (defined $user && length $user > 0) {
    ...
      }
      ...
    }
    
  2. or download this
    if (my ($grant, $db, $schema, $user, $scope) = $results[0] =~ /.*GRANT
    +\s(.+)\sON\s(.+)\.(.+)\sTO\s(\S+)\@(\S+)/i)
    {
    ...
        $scope  =~ tr/'`//d;
        ...
    }