in reply to Indirect variable expansion
~ $ export module='JSON::PP'; perl -M$module -e 'print ${$ENV{module}. +"::VERSION"}' 4.07~ $ ~ $
Next time please use code tags instead of pre .
Or just use the VERSION method
~ $ export module='JSON::PP'; perl -M$module -e 'print $ENV{module}->V +ERSION' 4.07~ $ ~ $
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Indirect variable expansion
by ikegami (Patriarch) on Nov 18, 2024 at 03:46 UTC | |
|
Re^2: Indirect variable expansion
by LanX (Saint) on Nov 18, 2024 at 12:06 UTC | |
by etj (Priest) on Nov 18, 2024 at 12:55 UTC | |
by LanX (Saint) on Nov 18, 2024 at 14:57 UTC | |
by hippo (Archbishop) on Nov 18, 2024 at 15:41 UTC | |
by jeffenstein (Hermit) on Nov 18, 2024 at 16:10 UTC | |
|