Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

(tye)Re: Find the permission problem

by tye (Sage)
on Dec 29, 2000 at 22:57 UTC ( [id://48865]=note: print w/replies, xml ) Need Help??


in reply to (zdog) Re: Find the permission problem
in thread Find the permission problem

Wrong. system() can take a single string or a list of strings (and an optional direct object). If a list of more that one string is given, then Perl won't call a shell to interpret the command-line string (that you didn't give it). If just one string, then Perl will call a shell if the string isn't simple enough (that is, if the string doesn't have any shell meta characters, it will just split it on whitespace and use fork()/exec() just as if you had given it more than one value).

Of course, platforms that don't have fork() don't quite obey this rule.

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re: Find the permission problem
by coreolyn (Parson) on Dec 30, 2000 at 03:45 UTC
    tye, perlfunc system() doesn't talk about taking an optional direct object nor am I finding it in any of my books. Where would I go to find more information on this topic?

    coreolyn

      In the following, the "PROGRAM" (which isn't followed by a comma) is the optional indirect object:

      system LIST system PROGRAM LIST [...] Like `exec', `system' allows you to lie to a program about its name if you use the `system PROGRAM LIST' syntax. Again, see the exec entry elsewhere in this document.
      at least I think that is what Larry called that.

              - tye (but my friends call me "Tye")

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://48865]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2024-04-18 12:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found