aspose file tools*
The moose likes Perl and the fly likes New to perl - what book should I read for this task? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Perl
Bookmark "New to perl - what book should I read for this task?" Watch "New to perl - what book should I read for this task?" New topic
Author

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

Thomas Kennedy
Ranch Hand

Joined: Jan 20, 2008
Posts: 137
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?
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11313
    
  16

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.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Siitesh Hind
Ranch Hand

Joined: Sep 06, 2012
Posts: 51
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
Hunter McMillen
Ranch Hand

Joined: Mar 13, 2009
Posts: 492

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.


"If the facts don't fit the theory, get new facts" --Albert Einstein
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11313
    
  16

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

Joined: Mar 13, 2009
Posts: 492

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.
Daniel Levine
Greenhorn

Joined: Mar 03, 2014
Posts: 11
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
Bartender

Joined: Oct 02, 2003
Posts: 11313
    
  16

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: New to perl - what book should I read for this task?