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. Advertisements

  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. Advertisements

  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. Advertisements

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. dpackwood
    Replies:
    3
    Views:
    2,190
  2. tweak
    Replies:
    14
    Views:
    3,075
    Eric Sosman
    Jun 11, 2004
  3. Alfonso Morra
    Replies:
    11
    Views:
    1,006
    Emmanuel Delahaye
    Sep 24, 2005
  4. ccc31807
    Replies:
    4
    Views:
    232
    smallpond
    Mar 26, 2009
  5. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Jan 23, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    535
    PerlFAQ Server
    Jan 23, 2011
  6. PerlFAQ Server
    Replies:
    0
    Views:
    1,017
    PerlFAQ Server
    Feb 3, 2011
  7. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Feb 27, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    537
    PerlFAQ Server
    Feb 27, 2011
  8. PerlFAQ Server
    Replies:
    0
    Views:
    994
    PerlFAQ Server
    Apr 4, 2011
Loading...