use Data::Dumper;
@arg2 = [{a => 1, b =>2}], [qw($balloon)];
Data::Dumper->Dump(@arg2)
gives
'$balloon = {
\'a\' => 1,
\'b\' => 2
};
Really? Using no version of Perl that I've ever used.
use warnings; use Data::Dumper; @arg2 = [{a => 1, b =>2}], [qw($balloon)]; print Data::Dumper->Dump(@arg2)
Useless use of anonymous list ([]) in void context at dd.pl line 3.
$VAR1 = [
{
'a' => 1,
'b' => 2
}
];
Precedence problem. You need parenthesis around the array. And lose the sigil on $balloon.
Update: removed some unnecessarily snarky commentary.
In reply to Re: Serialization and eval in YAML
by thundergnat
in thread Serialization and eval in YAML
by throop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |