• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

New to perl - what book should I read for this task?

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to read an xml file into an html page using Perl. When someone reads the page, I want to select an xml file based on its filename and the current date, read its contents, probably do an xsl transform, and push the results into element X in the html file on the fly. (In other words the html file contains a placeholder where the transform results should go. I don't want the page itself modified permanently.) I know about XSL but all I know about Perl is the Llama book. What should I read next to learn how to do this?
 
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
99% of my perl research is done using the O'reilly "Learning Perl" book. IMHO, it has almost everything you need in it.

"placeholder" to me implies using a format...but I don't know much about xml, xsl, or html. I do know perl is great for parsing and formatting. You many want to search cpan for modules to help with the parsing, or search around at perlmonks to see if anyone there has asked a similar question.
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Thomas,

Lot of stuff is available on the net unless you really want to buy a book where you wont find the important things that you require.

http://www.tizag.com/perlT/perlvariables.php

Rgds,

Seetesh
 
Ranch Hand
Posts: 492
Firefox Browser VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Learning Perl was already mentioned, but one of the better starting resources I have found is Modern Perl by Chromatic. It gives a good, concise overview to how you should be writing Perl. Another good resource is Perl Best Practices by Damian Conway. It might be more of a reference, but has really good examples of bad Perl and good Perl.

 
fred rosenberger
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hunter McMillen wrote:(It) has really good examples of bad Perl and good Perl.


Finding examples of bad perl is like looking for grains of sand on a beach...

 
Hunter McMillen
Ranch Hand
Posts: 492
Firefox Browser VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

fred rosenberger wrote:
Finding examples of bad perl is like looking for grains of sand on a beach...




I really wish that I was able to refute this statement, but alas I cannot I should say that Perl Best Practices shows you how you aught to be writing Perl.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IMHO the best Perl book is perldoc. ;)

If you must buy a book, I'd say it should be some kind of reference manual, that can be easily referred to while actually writing Perl scripts; the more succinct, the better. My (personal) experience is that thick, verbose introductory tomes on whatever programming language are not very useful - something I rather wish I'd learned before spending my money on them. My copy of K&R C sees more use as a reference manual for instance than any of my texts on Perl or shell scripting, even though I barely ever use C.

OTOH, if you're doing XML/HTML anything then you're probably a better programmer than I am, so take the above with a grain of salt...

Edit: sorry, didn't realize this thread was a month old. D'oh!
 
fred rosenberger
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Daniel Levine wrote:If you must buy a book, I'd say it should be some kind of reference manual, that can be easily referred to while actually writing Perl scripts; the more succinct, the better


The O'Reilly "Learning Perl" is only about 250 pages, so I'd call that pretty succinct.

Of course, I also find good old google very helpful. I frequently google "how do i do ABC in perl" and usually find the answer in 2-3 tries.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic