It is syntactically valid, it just won't do what he wants (no chance in hell).
The expression will evaluate to
$xml->{{}}, and that key (the stringified version of that anonymous hashref) is not defined, so a warning will be thrown.
something like that ;)(actually $xml->{gene}{{}} , but it's not really important)
If you didn't know what the comma operator would do in this expression, read "List" is a Four-Letter Word, as well as perldoc perlop
update:
use Data::Dumper; local $\="\n"; $a = { gene => { id => 3, label => 'generrrous' } }; print $a->{ gene, id}=1; print $a->{ gene => id }; print Dumper $a; __END__ 1 1 $VAR1 = { 'gene' => { 'label' => 'generrrous', 'id' => 3 }, 'gene‡˜id' => 1 };
|
MJD says you can't just make shit up and expect the computer to know what you mean, retardo! ** The Third rule of perl club is a statement of fact: pod is sexy. |
In reply to Re: Re: (jeffa) Re: XML::Simple
by PodMaster
in thread How to access results of XML::Simple?
by matth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |