Results 1 to 3 of 3

Thread: Newbie to Perl Programming

  1. #1
    Join Date
    Mar 2009

    Newbie to Perl Programming

    I am very new to Perl and I am trying to learn little by little. What statement adds the element (willie, 74) to the hash %fun?
    I have no idea what it is asking?

    Also how do you get the address of a scalar variable $truck?

    And finally, how do you get the address of a list literal?

  2. #2
    Join Date
    Jul 2003
    The City of Roses
    You should ask your teacher these questions.

  3. #3
    Join Date
    Oct 2007
    Vienna, Austria
    Or you can ask the perl documentation: perldata and perlop tell you about #1. If you don't understand the question, it says:
    Say you have a hash, like e.g.
    %fun = {
        jeff => 32,
        sally => 18,
    which holds the information that Jeff is 32 years old and Sally is 18. Now how do you add the record about Willy stating that he's 74? The resulting hash should look like
        jeff => 32,
        sally => 18,
        willy => 74,
    Again, the links above should help you get the answers, though you may want to read them from start rather than just the parts I gave links to.

    Answer for question #2 is in perlref.

    The third question is tricky and you may conclude the answer from the documents linked here.

    Good luck. ;-)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles