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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

The system function is inherently platform specific. Its arguments must be in a form the OS can digest, and available system calls vary widely between platforms. It seems to me that system as it is reminds us to think twice before calling it.

On *nix, the value returned by system doesn't necessarily reflect an OS error. It may contain an application-specific exit code. In perl, you can write exit -5; to indicate, say, that command line arguments are not to your liking, and provide other exit codes to help diagnose other runtime problems.

When perl system or a command line process returns, the process run is done and its environment has evaporated. Its $! (errno) is gone. All that is left is what can be recovered by wait. The child error $? encodes the low eight bits of the of the exit code, a signal number and a flag indicating a core dump.

What distinct information is available on exit from a VMS, Win32 or OS/2 system call? How much different are the extended error returns?

After Compline,
Zaxo


In reply to Re: RFC: Shell::DWIM by Zaxo
in thread RFC: Shell::DWIM by erikharrison

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-20 05:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found