http://www.cwhdallas.com/subroutines-book/
Subroutines Book
![]() |
Learning Perl, 5th Edition List Price: $39.99 Sale Price: $22.00 |
|
In this smooth, carefully paced course, a leading Perl trainer teaches you to program in the language that threatens to make C, sed, awk, and the Unix shell obsolete for many tasks. This book is the "official" guide for both formal (classroom) and informal learning. It is fully accessible to the novice programmer. Learning Perl, popularly known as "the Llama," is the book most programmers rely on to get started with Perl. The bestselling Perl tutorial since it was first published in 1993, this new fifth edition covers recent changes to the language up to Perl 5.10. This book reflects the combined experience of its authors, who have taught Perl at Stonehenge Consulting since 1991. Years of classroom testing and experience helped shape the book's pace and scope, and this edition is packed with exercises that let you practice the concepts while you follow the text. Topics include:Perl data & variable types Subroutines File operations Regular expressions String manipulation Lists & sorting Process management Smart matching Using third party modules Perl is the language for people who want to get work done. Originally targeted to sysadmins for heavy-duty text processing, Perl is now a full-featured programming language suitable for almost any task on almost any platform-from short fixes on the command line to web applications, bioinformatics, finance, and much more. Other books may teach you to program in Perl, but this book will turn you into a Perl programmer. |
|
BASIC Scientific Subroutines, Volume II List Price: $42.95 Sale Price: $29.99 |
|
|
Basic Scientific Subroutines List Price: $42.95 Sale Price: $29.50 |
|
Perl Makes Life Easier
Perl is wonderful interpreted, cross platform, very high level, powerful language which will make your life much easier.
You need to sort your files? Mass rename your files? Find certain string from multiple files? Need to automate web queries? Then Perl is your best friend. Some may argue that Perl is hard to learn and/or its syntax is ugly/hard to read. That is not entirely true. It’s just that there is too much “bad” Perl around the internet which causes confusion and misconceptions about the language. Here are few tips on how to write clean, understandable Perl;
1. Use lexical variables
2. Subroutines are your friend
3. Never ever quote numbers
4. Have perldoc perlretut and perldoc perlreftut open at all times
5. Use CPAN modules, don’t reinvent solutions
The purpose of this article is not to get you started in 3 minutes with Perl, but show how useful Perl can be for everyday tasks which will save you hours of manual work.
I love Perl one-liners, you write them in seconds but they save hours of work if done by hand.
For example if you wish to replace a string in a file
perl –wipe 's/string_that_needs_to_go/new_string/' file.txt
Or you want to parse all IPs from apache access_log file
perl -wlne 'print $1 if m/(d{1,3}.d{1,3}.d{1,3}.d{1,3})/' access_log
Perl regular expressions may appear hard and confusing but they make perfect sense and perldoc perlretut makes that sense. Trust me regular expressions will make your everyday tasks much easier.
If you invest one hour a day to Perl, Perl will save you a lot more time in future, and everyone knows time is money.
The books I recommend to start with Perl is Learning Perl 4th edition by Randal-Schwartz, Programming Perl 3rd edition by Larry Wall (the creator himself) and Perl Cookbook 2nd edition by Tom Christiansen (my favorite). All of these books are available in numerous places, shouldn’t take much effort to find them.
CPAN offers us a lot of modules to solve complicated problems. Just check search.cpan.org and browse through millions of modules for just about anything. The LWP module is an awesome module for simple web automation, however when things go complicated WWW::Mechanize is here to save the day.
Some of us like our programs to be good looking and user friendly. Well Perl can offer you that too, with its Perl/Tk extension. With a little bit effort you can make your command-line scripts look and feel great.
Perl is installed on most *NIX operating systems for a reason. However if you’re a windows user there are alternatives. Like I said Perl is cross platform and it can be installed on just about any operating system out there. For windows users I suggest Strawberry Perl. If you use cygwin then it’s probably a good idea to install their Perl port.
Perl is also awesome for CGI scripts. It comes with a lot of HTML modules like HTML::Mason and HTML::Template to manipulate HTML with just few lines. The CGI module of course is mandatory for any half-decent Perl-CGI script.
Don’t go parsing HTML using regular expressions, HTML::Parser will not only make it easy, but your scripts will look much better and someone else would be actually able to read them.
Perl is wonderful, I’ve been using it for years and I love it. I’m sure if you give it a little time you’ll love it in no time.
There is tons of online help/support for Perl. Even though Perl is very well documented, sometimes you need directions and advice from experts.
The IRC channel on irc.freenode.net #perl is the place to seek help but after you tried everything you could think of and consulted with perldoc and google.
About the Author
Deva Nullkowska is a freelance webmaster working on interesting projects only. Please visit my blog
Which one of these books is better?
Programming in C UNIX System Calls and Subroutines using C. download. by AD Marshall
OR
The C Book by Mike Banahan, Declan Brady and Mark Doran
Bluntly, I would get both of them. I LOVE A. D. Marshall's stuff. I use his tutorial on programming X-Windows all the time. Most of this stuff is current through the nineties but it is still VERY useful. It is ALSO as the title suggests UNIX specific -- which means that you would find it more useful on Linux but Unix and C evolved together.
The C book is just an excellent book.
Linux vs. E. Coli in Network Challenge
The similarities and differences in how Linux and life have evolved are enlightening to both biologists and programmers.
Thanks for visiting!




