Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: how do i parse a yaml set with perl ( can't )

by david2008 (Scribe)
on Feb 06, 2014 at 10:05 UTC ( #1073675=note: print w/replies, xml ) Need Help??


in reply to Re: how do i parse a yaml set with perl ( can't )
in thread how do i parse a yaml set with perl

Thanks for the quick reply.
I understand.
This file is created by a java program using the snakeyaml library. I will ask them to change the set to a hash where the values are 1.
  • Comment on Re^2: how do i parse a yaml set with perl ( can't )

Replies are listed 'Best First'.
Re^3: how do i parse a yaml set with perl ( can't )
by SuicideJunkie (Vicar) on Feb 06, 2014 at 15:01 UTC

    The order doesn't matter, but the elements are also simple values... why not make it an array?

    If you're making it a hash, then your values are used as the keys of the hash and you have to make up and store dummy values to complete the hash structure. That's confusing and inefficient.

      I use it internally as a set. It is true that i can just represent it as an array and internally convert it to a hash. This is a good point

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1073675]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2016-09-28 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (541 votes). Check out past polls.