Data Structures in PERL

Discussion in 'Perl Misc' started by Roman Rodriguez, Sep 3, 2004.

  1. Can you use PERL to create data structures such as linked list? if so, is
    there maybe a link where this can be studied?

    Thanks,
    -RR
     
    Roman Rodriguez, Sep 3, 2004
    #1
    1. Advertising

  2. Roman Rodriguez <> wrote:

    > Can you use PERL to create data structures such as linked list?



    You are expected to check the Perl FAQ *before* posting to the
    Perl newsgroup you know.

    perldoc -q linked

    How do I handle linked lists?


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Sep 3, 2004
    #2
    1. Advertising

  3. Roman Rodriguez

    Paul Lalli Guest

    "Roman Rodriguez" <> wrote in message
    news:...
    > Can you use PERL to create data structures such as linked list? if

    so, is
    > there maybe a link where this can be studied?


    (Perl. Not PERL. See: perldoc -q difference)

    You *can*, but you don't want to. Perl's native arrays are already more
    powerful than linked lists. This simple question smells like an XY
    problem. You need to do X, and you've decided based on programming in
    other languages that the way to do X is with a linked list (Y). So
    you're asking us how to do Y intead of how to do X.

    What is it you actually want to do?

    To answer the question you (sort of) asked, a description of Perl
    datastructures - hashes, arrays, arrays of array references, etc, are
    discussed in:
    perldoc perldsc

    Paul Lalli
     
    Paul Lalli, Sep 3, 2004
    #3
  4. Roman Rodriguez

    Guest

    "Roman Rodriguez" <> wrote:
    > Can you use PERL to create data structures such as linked list?


    Yes, you can. But you rarely will want or need to.

    > if so,
    > is there maybe a link where this can be studied?


    What is your goal? If you want to learn about linked lists, then
    it probably isn't so relevant what language you use, so I'd just take
    whatever language the tutorial you find happens to use. If your goal
    is to learn perl, I'd choose something other than linked lists as the foil
    for doing so. That said,
    perldoc -q linked
    should be enough to start you off exploring linked lists in Perl.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Sep 3, 2004
    #4
  5. On Fri, 3 Sep 2004 04:28:05 -0700, Roman Rodriguez <>
    wrote:


    perldoc -q linked list
     
    Edward Wijaya, Sep 5, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tweak
    Replies:
    14
    Views:
    2,798
    Eric Sosman
    Jun 11, 2004
  2. Alfonso Morra
    Replies:
    11
    Views:
    733
    Emmanuel Delahaye
    Sep 24, 2005
  3. Replies:
    4
    Views:
    210
  4. Ignoramus17503

    Converting XML to Perl structures FAST

    Ignoramus17503, Jun 13, 2006, in forum: Perl Misc
    Replies:
    15
    Views:
    211
    Ignoramus7096
    Jun 14, 2006
  5. ccc31807
    Replies:
    4
    Views:
    170
    smallpond
    Mar 26, 2009
Loading...

Share This Page