sreenath has asked for the wisdom of the Perl Monks concerning the following question:

I am very new to Perl Programming.But would like to explore more on different sections like Arrays,Hashes,Regular Expressions and Loops. Can any one give me some examples on each,so that I can explore more? CAn you suggest any website which gives you more examples ? Many thanks for your response.

Replies are listed 'Best First'.
Re: Perl Programs
by marto (Cardinal) on Dec 09, 2010 at 12:07 UTC
Re: Perl Programs
by CountZero (Bishop) on Dec 09, 2010 at 12:54 UTC
    You can find free books on learning Perl here: Beginning Perl or Picking up Perl.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Perl Programs
by jffry (Hermit) on Dec 09, 2010 at 23:48 UTC

    Perl Best Practices is a great book for novices as well, even though the title implies one already knows a lot about Perl. Using just one example: how to open a file. Looking at reference docs gives you 20 different ways to open a file. Perl Best Practices tells you the two best ways to do it and why (for most cases confronting beginner to medium level users).

    Also, when you are writing small programs to teach yourself things, nothing beats reading how others do it in the PerlMonks Q&A section.

    EDIT: Added some conditional text to my assertion.

      Perl Best Practices tells you the two best ways to do it and why.
      No, it does not. Please, do read the introduction of the book, and act upon it.

      PBP discusses two ways of opening files, and gives reasons why you may pick these ways in your style of programming.

      So many people wield PBP and act as if it's gospel. I seriously believe the Perl community would have been better off if the book was never written. (Not because of its content, but because of religious zealots treating it as word of god).

        I don't know about the Perl community, but this Perl user has benefited greatly from PBP. I would not be better off if it had never been published.

        Also, no zealotry here. Obviously, stray from rules when you need to once you know what you are doing and why. Until then, a simple set of rules is a great aid.

Re: Perl Programs
by Khariton (Sexton) on Dec 09, 2010 at 21:21 UTC
    The best way is reading O'Reilly's "Perl Cookbook second edition". Many interesting about all ways of perl programming.
    You can find it in network as web, pdf or chm...

      "You can find it in network as web, pdf or chm..."

      Are you suggesting they download an illegal copy of the book? Not cool. O'Reilly don't sell books in chm format.

      A reply falls below the community's threshold of quality. You may see it by logging in.