Call details for Shell commands in Perl

Source: Internet
Author: User
In PERL development, system commands can usually be executed using the systems function or the ' operator ', but pay attention to alias, BG, bind, break, Builtin, CD, command, Compgen, complete, continue, Declare, dirs, Disown, Echo, enable, Eval, exec, exit, export, FC, FG, Getopts, hash, help, history, jobs, kill, le T, local, logout, popd, printf, pushd, pwd, read, ReadOnly, return, set, shift, shopt, source, suspend, test, times, tra P, type, typeset, Ulimit, Umask, Unalias, unset, wait, etc. shell internal commands (that is, a command that does not execute files in the file system) can be executed directly, and the error is that the file or directory cannot be found. You can add sh–c to the command before you implement it.   And for CD, Umask and other session-type commands, should use the internal functions of Perl chdir, umask, etc. to achieve more reliable functions. Complement: If the system calls the background program, it is certainly hope that does not affect the foreground of the CGI program to respond to HTTP requests, this time, notice that Firefox can immediately get system calls after the output, ie not, Will wait until the daemon that is called by the system finishes executing before it gets the HTTP output. In fact, only need in the system called the background program Riga >/dev/null 2>&1 output redirection can solve the problem of IE response.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.