Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: how does qx select a "/bin/sh equivalent"?

by ikegami (Patriarch)
on Jun 10, 2008 at 16:20 UTC ( [id://691265]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -le'use Config; print $Config{sh}'
    /bin/sh
    
  2. or download this
    $ /bin/sh -c 'echo $SHELL'
    /bin/bash
    
  3. or download this
    sub backticks_mysh {
      open(my $pipe, '-|', '/bin/mysh', '-c', $_[0])
    ...
      local $/ = wantarray ? $/ : undef;
      <$pipe>
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-24 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found