RE: "Programming Perl" vs perldoc
Richard Hobson wrote: > So, I've done the "Learning Perl" book, and frustrating myself no end > by trying to write a chess program using just the knowledge contained > in "Learning Perl" and with no modules. > I thought about getting "Intermediate Perl", but I've heard that > "Programming Perl" is the best next step. > But, what's the advantage of "Programming Perl" when we have "perldoc"? > What does the book give me that perldoc does not? A chess program sounds ambitious for a first program in a new language, but more power to you. :-) Download and install perlindex -- it is a perldoc wrapper script that provides search and reading capabilities: http://search.cpan.org/~ulpfr/perlindex-1.502/perlindex.PL The perldoc tutorials are excellent and I've learned a lot from them, but I see four books as the essential library for competence in Perl: 1. Learning Perl -- this is the first-level instruction book that gets you up the initial learning curve. Read it cover to cover, enter the code, and do the exercises. I recall pounding the first one-third in one day, and most of the rest in under a week: http://oreilly.com/catalog/9780596520106/index.html 2. Perl Cookbook -- this is a source book of example Perl code, organized by topic/ task. The code is idiomatic, and the explanations are excellent. This book will give you the understanding and confidence you need to start writing useful Perl scripts. Buy this book as soon as you finish Learning Perl. You will want to keep it nearby whenever you code. I read the first edition cover to cover, but it's meant to be a random-access reference: http://oreilly.com/catalog/9780596003135/index.html 3. Programming Perl -- this is the language reference manual. Use it to look things up when you need the hard-core explanation. I'd suggest also buying this book as soon as you finish Learning Perl. It too is a keeper. I believe I've read (only) both the 2nd and 3rd editions cover to cover once each -- gnarly, but unnecessary for ordinary proficiency: http://oreilly.com/catalog/9780596000271/index.html 4. Intermediate Perl -- this is the second-level instruction book that takes you from writing scripts to writing functional- and object-oriented programs and libraries. After this book, you will know how to make good use of the thousands of Perl modules available on CPAN and elsewhere. You can hold off on this one until you feel the need: http://oreilly.com/catalog/9780596102067/index.html As you work your way through the above and beyond, perldoc will be your primary information source for the modules that you choose. Other resources include source code and the community. As an aside, I find that I am the most comfortable with Perl on a Unix platform (I prefer Debian GNU/Linux). Other platforms can make things more difficult. HTH, David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: LWP
ANJAN PURKAYASTHA wrote: I have a file stored at a location: http://parent_dir/file Which among gazillion LWP options can I use to download and store the file on my machine? Have you read the LWP cookbook? perldoc lwpcook John -- Those people who think they know everything are a great annoyance to those of us who do.-- Isaac Asimov -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Tutorial on using Win32::Console
I don't think my previous message went through. I'm writing a rogue-like game on Win32 (WinXP in a DOS box). I won't be releasing it, I just want practice doing this. Is it better to use Term::AnsiColor or Win32::Console for placing characters in random places on the screen? Also, where can I get a tutorial on using Win32::Console? The perldocs on this are not really helpful. I don't do a lot of perl, or complicated perl with pointers and stuff. Thanks. Chuck -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
I've found the site:- http://www.pdf-search-engine.com/perl-pdf.html very useful for things I've worked on for examples. I would say, if you find a book thats good show respect to the author ande purchase a copy. -- Andrew in Edinburgh Scotland On Wed, 8 Apr 2009, Brian J. Miller wrote: Richard Hobson wrote: So, I've done the "Learning Perl" book, and frustrating myself no end by trying to write a chess program using just the knowledge contained in "Learning Perl" and with no modules. Interesting first choice, but okay... Was there something in particular that you are getting hung up on? I thought about getting "Intermediate Perl", but I've heard that "Programming Perl" is the best next step. I'd disagree and say that your suggestion of Intermediate Perl would be the next best step. But, what's the advantage of "Programming Perl" when we have "perldoc"? What does the book give me that perldoc does not? A book. Some descriptions are more in depth and having a book with a table of contents and index can often be easier to reference when you don't know *where* to look in perldoc, but much of the information will be the same. (Any number of sites and Google can help with where to look.) Thanks, Richard -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Tutorial on using Win32::Console?
I'm making a rogue-like game on Win32 (WinXP in DOS box). No I will not release it, I just want practice doing this. What is the best thing to use for placing a character at various points on the screen? Win32::Console or Term::AnsiColor? Is there a tutorial on using Win32::Console? The perl doc doesn't seem too helpful in this regard. That is more of a reference than a detailed tutorial. Thanks. Chuck -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Win32 console/curses app, how to?
I'm making another rogue-like game with Perl on Win32 (WinXP in DOS box). Someone said that I should look at Term::ANSIScreen or WIN32::Console to do cursor positioning and screen management. Is there a website on how to use these 2 modules? Google simply returns 10,000 useless results and the POD pages are useless too, omitting far too many critical details, such as what preparations must go on before calling a certain function. Thank you. Chuck p.s. No I will not be releasing the game, I'm just doing this for practice. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: LWP
On Wed Apr 08 2009 @ 10:29, Gunnar Hjalmarsson wrote: > Telemachus wrote: >> On Wed Apr 08 2009 @ 3:22, ANJAN PURKAYASTHA wrote: >>> I have a file stored at a location: http://parent_dir/file >>> Which among gazillion LWP options can I use to download and store the file >>> on my machine? >> >> If you just want to grab the file, you can use LWP::Simple to grab it: >> >> use LWP::Simple; >> >> my $url = 'http://parent_dir/file'; >> my $local = '/path/to/local/file'; >> my $file = getstore($url, $local); > > getstore() returns the HTTP status code, so 'file' is not the most > appropriate name of a variable to which the return value is assigned. Gah: you're absolutely right. The last line is the coding equivalent of a mixed metaphor: half of my brain was thinking this: my $file = get($url); print $file; The other half of my brain thought: getstore($url, $local); -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: LWP
to all, thanks for your prompt replies. You guys are great! Anjan On Wed, Apr 8, 2009 at 4:29 PM, Gunnar Hjalmarsson wrote: > Telemachus wrote: > >> On Wed Apr 08 2009 @ 3:22, ANJAN PURKAYASTHA wrote: >> >>> I have a file stored at a location: http://parent_dir/file >>> Which among gazillion LWP options can I use to download and store the >>> file >>> on my machine? >>> >> >> If you just want to grab the file, you can use LWP::Simple to grab it: >> >> use LWP::Simple; >> >> my $url = 'http://parent_dir/file'; >> my $local = '/path/to/local/file'; >> my $file = getstore($url, $local); >> > > getstore() returns the HTTP status code, so 'file' is not the most > appropriate name of a variable to which the return value is assigned. > > -- > Gunnar Hjalmarsson > Email: http://www.gunnar.cc/cgi-bin/contact.pl > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > -- = anjan purkayastha, phd bioinformatics analyst whitehead institute for biomedical research nine cambridge center cambridge, ma 02142 purkayas [at] wi [dot] mit [dot] edu 703.740.6939
Re: LWP
Telemachus wrote: On Wed Apr 08 2009 @ 3:22, ANJAN PURKAYASTHA wrote: I have a file stored at a location: http://parent_dir/file Which among gazillion LWP options can I use to download and store the file on my machine? If you just want to grab the file, you can use LWP::Simple to grab it: use LWP::Simple; my $url = 'http://parent_dir/file'; my $local = '/path/to/local/file'; my $file = getstore($url, $local); getstore() returns the HTTP status code, so 'file' is not the most appropriate name of a variable to which the return value is assigned. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: LWP
ANJAN PURKAYASTHA wrote: I have a file stored at a location: http://parent_dir/file Which among gazillion LWP options can I use to download and store the file on my machine? use LWP::Simple; getstore('http://parent_dir/file', 'file'); -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: LWP
On Wed Apr 08 2009 @ 3:22, ANJAN PURKAYASTHA wrote: > I have a file stored at a location: http://parent_dir/file > Which among gazillion LWP options can I use to download and store the file > on my machine? > TIA > Anjan If you just want to grab the file, you can use LWP::Simple to grab it: use LWP::Simple; my $url = 'http://parent_dir/file'; my $local = '/path/to/local/file'; my $file = getstore($url, $local); -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
LWP
I have a file stored at a location: http://parent_dir/file Which among gazillion LWP options can I use to download and store the file on my machine? TIA Anjan -- = anjan purkayastha, phd bioinformatics analyst whitehead institute for biomedical research nine cambridge center cambridge, ma 02142 purkayas [at] wi [dot] mit [dot] edu 703.740.6939
Re: "Programming Perl" vs perldoc
One other thing: http://perldoc.perl.org/ is an excellent way to read the docs online (searchable too), and it provides pdf versions of almost everything. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
On Wed Apr 08 2009 @ 1:08, Richard Hobson wrote: > But, what's the advantage of "Programming Perl" when we have "perldoc"? > What does the book give me that perldoc does not? One thing that nobody has mentioned is that Programming Perl hasn't been updated since Perl 5.6. There have been two major releases since that, and we're now at 5.10. Your system probably has some version of 5.8 if it's relatively recent. In many ways, the big picture is probably still the same, and many of the docs probably haven't been rewritten either, but the docs for your installation should be closer to the Perl you're actually working with. I second the recommendation that you look through the tutorials in perldoc. Many are excellent and perfect for intermediate development. I especially recommend these: perldoc perlreftut (How to make and use references) perldoc perllol (Arrays of arrays, more complex data structure) perldoc perldsc (All kinds of complex data structures) perldoc perltoot (Introduction to OO programming in Perl, not to OO itself) perldoc perlretut (Regular expression tutorial) perldoc perlopentut (How to open things in Perl - it's much more fun than it sounds) Hope this helps, T -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
On Wed, Apr 8, 2009 at 08:57, Richard Hobson wrote: > On Wed, 08 Apr 2009 08:50 -0400, "Chas. Owens" > wrote: >> Your whois information suggests that you live in the US; I am always >> amazed to hear fellow Americans say things like "that book is >> expensive." We have a wonderful lending library system in this >> country, use it. If your local library does not have the 3rd Edition >> of Programming Perl, then ask you librarian to order a copy. They >> generally want to help you. > > Actually, no. I live in the UK, and price for O'Reilly books here are > significantly higher. Amazon US has "Intermediate Perl" new for $25, > while Amazon UK has it for $46, excluding postage. Also, I live in a > relatively small town in Scotland, whose libraries tend not to purchase > obscure programming books on demand. > > Look, I'm not after pity. I just want advice about which book to get. > > Cheers, > Richard > And I am not offering pity, but a method to get what you need. You may be able to get books through intra/inter-library loan, talk to your local librarian. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
On Wed, 08 Apr 2009 08:50 -0400, "Chas. Owens" wrote: > Your whois information suggests that you live in the US; I am always > amazed to hear fellow Americans say things like "that book is > expensive." We have a wonderful lending library system in this > country, use it. If your local library does not have the 3rd Edition > of Programming Perl, then ask you librarian to order a copy. They > generally want to help you. Actually, no. I live in the UK, and price for O'Reilly books here are significantly higher. Amazon US has "Intermediate Perl" new for $25, while Amazon UK has it for $46, excluding postage. Also, I live in a relatively small town in Scotland, whose libraries tend not to purchase obscure programming books on demand. Look, I'm not after pity. I just want advice about which book to get. Cheers, Richard -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
On Wed, 08 Apr 2009 13:08:41 +0100, Richard Hobson wrote: > But, what's the advantage of "Programming Perl" when we have "perldoc"? > What does the book give me that perldoc does not? In earlier editions, the only difference was footnotes. Later editions have more significant differences but I do not have one at hand to be more specific. I *think* that at least one chapter in the Camel is not in perldoc. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
On Wed, Apr 8, 2009 at 08:42, Richard Hobson wrote: snip > OK. I'll probably stick with perldoc and get "Intermediate Perl". I'm > currently unemployed, so I can't really fork out for both books right > now - but I have plenty of time to learn Perl! snip Your whois information suggests that you live in the US; I am always amazed to hear fellow Americans say things like "that book is expensive." We have a wonderful lending library system in this country, use it. If your local library does not have the 3rd Edition of Programming Perl, then ask you librarian to order a copy. They generally want to help you. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
Richard Hobson wrote: > Thanks Brian > > On Wed, 08 Apr 2009 08:37 -0400, "Brian J. Miller" >> Interesting first choice, but okay... Was there something in particular >> that you are getting hung up on? > > Yeah, the complexity of chess! I'm getting there. I do miss a lot of > short-cuts and efficiencies in Perl that would help, but this is a good > exercise to learn Perl. > "Miss a lot of short-cuts" as in they aren't in Perl, or you just haven't found them? Can you give a for instance? >> I'd disagree and say that your suggestion of Intermediate Perl would be >> the next best step. >> >> A book. Some descriptions are more in depth and having a book with a >> table of contents and index can often be easier to reference when you >> don't know *where* to look in perldoc, but much of the information will >> be the same. (Any number of sites and Google can help with where to >> look.) > > OK. I'll probably stick with perldoc and get "Intermediate Perl". I'm > currently unemployed, so I can't really fork out for both books right > now - but I have plenty of time to learn Perl! > Sorry to hear that, I once felt that "Perl" stood for "Paid Employment Recently Located" after finding a job during the last bubble burst. You might try a local library, or depending on your location a Perl Mongers group or Linux Users Group, in which case someone is likely to have a copy you can borrow. Additionally if you look at "perldoc perl" you will get a list of docs, reviewing the "tutorials" there, particularly on objects, references, and modules (the original name of Intermediate Perl) will get you more advanced quickly. http://www.pm.org/ - for Perl Mongers groups HTH and good luck, -- Brian J. Miller End Point Corp. http://www.endpoint.com/ br...@endpoint.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
On Wed, Apr 8, 2009 at 08:37, Brian J. Miller wrote: snip >> I thought about getting "Intermediate Perl", but I've heard that >> "Programming Perl" is the best next step. >> > > I'd disagree and say that your suggestion of Intermediate Perl would be > the next best step. snip I would say both are the next step. You need the Camel to look things up and the Alpaca to help understand the things you find and to give you guidance on what to look for in the Camel. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
Thanks Brian On Wed, 08 Apr 2009 08:37 -0400, "Brian J. Miller" > Interesting first choice, but okay... Was there something in particular > that you are getting hung up on? Yeah, the complexity of chess! I'm getting there. I do miss a lot of short-cuts and efficiencies in Perl that would help, but this is a good exercise to learn Perl. > I'd disagree and say that your suggestion of Intermediate Perl would be > the next best step. > > A book. Some descriptions are more in depth and having a book with a > table of contents and index can often be easier to reference when you > don't know *where* to look in perldoc, but much of the information will > be the same. (Any number of sites and Google can help with where to > look.) OK. I'll probably stick with perldoc and get "Intermediate Perl". I'm currently unemployed, so I can't really fork out for both books right now - but I have plenty of time to learn Perl! Cheers, Richard -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
Thanks Brian On Wed, 08 Apr 2009 08:37 -0400, "Brian J. Miller" > Interesting first choice, but okay... Was there something in particular > that you are getting hung up on? Yeah, the complexity of chess! I'm getting there. I do miss a lot of short-cuts and efficiencies in Perl that would help, but this is a good exercise to learn Perl. > I'd disagree and say that your suggestion of Intermediate Perl would be > the next best step. > > A book. Some descriptions are more in depth and having a book with a > table of contents and index can often be easier to reference when you > don't know *where* to look in perldoc, but much of the information will > be the same. (Any number of sites and Google can help with where to > look.) OK. I'll probably stick with perldoc and get "Intermediate Perl". I'm currently unemployed, so I can't really fork out for both books right now - but I have plenty of time to learn Perl! Cheers, Richard -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: "Programming Perl" vs perldoc
Richard Hobson wrote: > So, I've done the "Learning Perl" book, and frustrating myself no end by > trying to write a chess program using just the knowledge contained in > "Learning Perl" and with no modules. > Interesting first choice, but okay... Was there something in particular that you are getting hung up on? > I thought about getting "Intermediate Perl", but I've heard that > "Programming Perl" is the best next step. > I'd disagree and say that your suggestion of Intermediate Perl would be the next best step. > But, what's the advantage of "Programming Perl" when we have "perldoc"? > What does the book give me that perldoc does not? > A book. Some descriptions are more in depth and having a book with a table of contents and index can often be easier to reference when you don't know *where* to look in perldoc, but much of the information will be the same. (Any number of sites and Google can help with where to look.) > Thanks, > Richard > -- Brian J. Miller End Point Corp. http://www.endpoint.com/ br...@endpoint.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
"Programming Perl" vs perldoc
So, I've done the "Learning Perl" book, and frustrating myself no end by trying to write a chess program using just the knowledge contained in "Learning Perl" and with no modules. I thought about getting "Intermediate Perl", but I've heard that "Programming Perl" is the best next step. But, what's the advantage of "Programming Perl" when we have "perldoc"? What does the book give me that perldoc does not? Thanks, Richard -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/