in reply to variable as hash name
It can be done using eval even with strict:
14:36 >perl -Mstrict -MData::Dump -wE "my $variable = 'name01'; eval q +q[our %{$variable} = ( valorC => 'value03', valorD => 'value04', );]; + eval qq[our %{$variable}; dd %{$variable},;];" ("valorD", "value04", "valorC", "value03") 14:36 >
Why you’d want to do it is, of course, another question altogether...
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: variable as hash name
by blackzero (Acolyte) on Dec 08, 2012 at 05:51 UTC |