Re: parsing a tree like structure



On Thu, Jun 26, 2008 at 11:53 PM, Jeff Peng <peng.kyo@xxxxxxxxx> wrote:
On Thu, Jun 26, 2008 at 9:57 PM, Pat Rice <patrick.j.rice@xxxxxxxxx> wrote:

\==+Interface :
|----Link State.........................................Down
\==+SCSI Interface :

Is this the info in a text file?
If so I think you must parse it by hand, after that you create the
corresponding data structure (most likely a hash).


"by hand" I mean you code it by yourself, there is maybe not such a
module for this special usage.


--
Jeff Peng - Peng.Kyo@xxxxxxxxx
http://home.arcor.de/mailerstar/jeff
.



Relevant Pages

  • Re: Using ruby hash on array
    ... I then also define a parse method on that class that will take a line and parse it into a new data structure. ... This is the value returned for keys that are not present in the Hash. ... Then the code reads from all input files named on the command line, parses each line and increments the counter for the entry. ...
    (comp.lang.ruby)
  • Re: copying hashes without references
    ... > to parse). ... I created a hash with the common attributes and tried to ... If you want to really copy the contents of a data structure ... instead of the references it contains, this is called a "deep copy". ...
    (comp.lang.perl.misc)
  • Re: I am needing a gentle introduction to accessing a perl array from a reference
    ... The data structure here is nothing more than a flat array. ... There is no hash anywhere in your code up at the top... ... Returns a list consisting of all the keys of the named hash. ... We need an understanding of the data structure if we are ...
    (comp.lang.perl.misc)
  • Re: Hash order bug?
    ... a review of one's Data Structures course may be in order ... did I realize that the underlying data structure is a hash, ... If you need to iterate through a hash in order by key, ...
    (comp.lang.ruby)
  • Re: use SDBM_File - Cant use string as a HASH ref
    ... I'm trying to tie this kind of hash into SDBM ... DBM files can only store simple values like strings and numbers. ... serialize the data structure as a string before storing it in the DBM, ... there were 100 perfect squares ...
    (perl.beginners)