Pazzeo has asked for the wisdom of the Perl Monks concerning the following question:
Hello everybody,
I have a problem using YAML, in particular I want to save the values with also the hash variable name.
Example in my code I have the following code:In the generated test.yaml I have always the following information:use YAML qw'DumpFile LoadFile'; . . . DumpFile("test.yaml", \%test);
But I would like to have the following datas:--- key1: value1 key2: value2
test: key1: value1 key2: value2
In particular I would substitute the --- with the name of hash variable.
How could I generate this output in the file? Is it possible? Thanks in advance Pazzeo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Problem using YAML
by choroba (Archbishop) on Dec 29, 2011 at 18:41 UTC | |
by Pazzeo (Initiate) on Dec 29, 2011 at 18:53 UTC | |
by perlfan (Vicar) on Dec 29, 2011 at 20:58 UTC | |
by choroba (Archbishop) on Dec 29, 2011 at 19:24 UTC | |
Re: Problem using YAML
by Anonymous Monk on Dec 29, 2011 at 18:48 UTC | |
Re: Problem using YAML
by anneli (Pilgrim) on Dec 31, 2011 at 02:55 UTC |
Back to
Seekers of Perl Wisdom