http://www.perlmonks.org?node_id=229463


in reply to shell to perl

Did you do ...
$ perl -e 'my $env = system( qq ( whoami )) ;'
... that worked for me?

Replies are listed 'Best First'.
Re: Re: shell to perl
by sauoq (Abbot) on Jan 24, 2003 at 00:31 UTC
    ... that worked for me?

    Uhm... No, it didn't. In your case, $env was set to the exit status of whoami(1), probably 0.

    -sauoq
    "My two cents aren't worth a dime.";
    
      Uhm... No, it didn't. In your case, $env was set to the exit status of whoami(1), probably 0.
      Yeah so ... does that mean it "didn't work"?
      *Geez*
      $ perl -e 'my $env = system( qq ( whoami )) ;' rbc $ perl -e 'my $env = system( qq ( whoru )) ;' wrong