Help for this page

Select Code to Download


  1. or download this
    my $resultLdapSearch;
    {
    ...
    close $P or 
       die $! ? "error closing pipe: $!" : "ldap_server exitted with a non
    +zero exit status: $?";
    }
    
  2. or download this
    sub shell_quote1 { local($_) = @_; s/([^\w\n])/\\$1/g; s/\n/\"\n\"/g; 
    +length or $_ = q/""/; $_ }
    sub shell_quote { local($_) = @_; s/([\\\$\"\`])/\\$1/g; qq/"$_"/ }
    sub shell_quote2 { local($_) = @_; s/'/'\\''/g; qq/'$_'/ }
    sub bash_quote3 { local($_) = @_; s/(\W)/sprintf("\\x%02x", ord($1))/g
    +e; qq/\$'$_'/ }