in reply to Re^5: Indirect variable expansion
in thread Indirect variable expansion
You would still have to export it to see it in the perl process:
$ export M=MyMod $ perl -M$M -E 'say $ENV{M}->VERSION' $ unset M
Or just do it in a subshell to keep your environment clean:
$ (export M=MyMod; perl -M$M -E 'say $ENV{M}->VERSION')
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Indirect variable expansion
by LanX (Saint) on Nov 18, 2024 at 16:35 UTC |