Hello list,

I am not sure how 'env' command works.

for example, what's the difference between '/usr/bin/perl' and 'env
perl' ?

I know env may set a environment variable in system, so my question also
includes:

1. where to see a shell environment variable? I tried 'echo $ENV'
showing nothing.

2. then I tried the following one-line perl to search for 'perl'
environment variable.

$ perl -le 'for( keys %ENV ){print "$_ --> $ENV{$_}"}' |grep perl
_ --> /usr/bin/perl

the key for perl is "_" in environment variable? under this key, why
'env perl' just works?

Thanks for your help.

regards.
timothy


Reply via email to