Perls before Swine Perl tutorial
I’ve just completely revamped Perls before Swine. Perl isn’t a tutorial I teach very often, but I did one for the University on Tuesday and realized ahead of time that Swine was far too outdated. Worse, the previous version had been written for a specific group of people most of whom were long gone anyway.
The new version, rather than presenting ideas and exercises, with answers in the back, follows the standard I’ve found more useful for other books: building a useful work over several iterations.
Because most of my Perl work is for filtering data, that’s what it focuses on. It also covers symbolic references and hard references, features I’m not even sure were available when I wrote the previous version.
Rather than working on the /etc/passwd file! as the previous one did (because, at the time, you could be reasonably assured that not only would the /etc/passwd file be available, but that it would be readable by everyone!) I’m using the same sample data for tutorials that the MySQL tutorial uses.
Perl is a twenty-year-old scripting language designed for managing text. It is cross-platform, running on Linux, Unix, Mac OS X, Windows, and probably many more operating systems. It comes pre-installed on most operating systems today, and is used for managing server tasks, formatting documents, and filtering data. It may be the most-used programming language on the web, and has sometimes been called the duct-tape of the Internet.
If you’re familiar with the use of duct tape, you’ll have some idea of what Perl gets used for. Perl is not the prettiest of solutions. But it works. It holds together things that would otherwise never work together, and it is a useful tool for creating quick solutions to thorny problems. There is an elegance in duct tape, an elegance in the solutions of the trenches. When something is broken, it needs to be fixed.
It is available in RTF (from Word), HTML, and PDF.
- Perls Before Swine
- A basic Perl tutorial covering reading files, filtering files, importing into SQL databases, and displaying on the web.
- Sample data for tutorials (Zip file, 188.0 KB)
- This sample data contains a file of songs and a file of albums in tab-delimited format, for use in various tutorials on the Neon Alley web site.
- Internet and Programming Tutorials
- Internet and Programming Tutorials ranging from HTML, Javascript, and AppleScript, to Evaluating Information on the Net and Writing Non-Gendered Instructions.
More Perl
- Simple .ics iCalendar file creator
- A simple Perl script to create an ics file from a human-readable text of events.
- No premature optimization
- Don’t optimize code before it needs optimization or you’re likely to create unoptimized code.
- Using Term::ANSIColor with GeekTool
- Rather than using the raw codes directly, Perl (at least on OS X) comes with Term::ANSIColor built in.
- Nisus HTML conversion
- New features in Nisus’s scripting language make HTML conversion almost a breeze.
- Nisus “clean HTML” macro
- The Nisus macro language is Perl; this means we can use all of Perl’s strengths as a text filter scripting language in Nisus.
- Three more pages with the topic Perl, and other related pages
More tutorials
- Django tutorial mostly ready
- My long-promised Django tutorial is pretty much ready. It’s still designed around an in-person tutorial, but you should be able to get started using it even if you’re on your own.
- JavaScript for Beginners revised
- I’ve completely revised my JavaScript for Beginners tutorials to be more in tune with modern JavaScript, and to provide more useful examples in general.
- Invariant sections to disappear from the FDL?
- The Free Software Foundation is revisiting the GNU Free Documentation License. Hopefully, they’ll fix the problem of invariant sections in otherwise open documents.
- Persistence of Vision tutorial
- A step-by-step tutorial, available under the Gnu Free Documentation License, on using the Persistence of Vision raytracer.
- JavaScript for Beginners update
- The JavaScript tutorial has been updated by introducing loops earlier, and in the first section.
- Two more pages with the topic tutorials, and other related pages