in reply to shell to perl

What is it that you're trying to do? Assign the string whoami to $env? That's my $env = 'whoami'; - or are those supposed to be backticks? In that case system is not what you want as it just returns the process' return code. If you want to capture the output, you have to use backticks, just like in shell: my $env = `whoami`; You can also use the qx notation: my $env = qx[whoami]; Both do the same, the latter just lets you pick different delimiters when that's convenient.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: shell to perl
by suekawar (Novice) on Jan 23, 2003 at 23:04 UTC
    thanks