Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by ikegami (Patriarch)
on Jun 10, 2008 at 16:20 UTC ( #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? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2023-02-02 13:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (19 votes). Check out past polls.

    Notices?