⭐ in reply to variable through another variable
$testing = "Hello, World!\n"; $var = "testing"; $data = $$var; print $data; # prints Hello, World!
(You can remove quotes from hash keys that have no \W characters: $hash{testing}.)$hash{"testing"} = "Hello, World!\n"; $var = "testing"; $data = $hash{$var}; print $data;
|
|---|