~$ M=whatever perl -E'say $ENV{M}' whatever
unfortunately a dynamic use inside the process is not less complicated than the solutions already shown (eval or Ikegami's if 1 trick)
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
In reply to Re^7: Indirect variable expansion
by LanX
in thread Indirect variable expansion
by mvanle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |