O'Reilly logo

Perl for Web Site Management by John Callender

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Getting Your Tools in Order

As I explained in the Preface, this book is intended for readers who have some experience creating web sites and now want to move to the next level, using the Perl programming language to create larger, more useful sites. In this first chapter, though, we won’t be discussing Perl. Instead, we’ll talk about some of the other things you’ll be using as you make that transition: a good hosting provider, the Unix shell environment, and a text editor for writing your programming code.

If you were setting out to climb a mountain (or even to take a short hike in the backcountry), you’d want to make sure you had everything squared away before you left the trailhead. That’s what this chapter is about: getting you set up properly with gear and supplies before you head into the wilderness.

If you already have a web-hosting provider you’re happy with, are familiar with using an ssh or Telnet client to log into a Unix shell session, and have a programmer’s text editor you’re happy with, congratulations! You should probably skip right to the next chapter, where I introduce the Perl programming language. Otherwise, read on.

Open Source Versus Proprietary Software

I assume in this book that you work in a Windows or Macintosh environment for your day-to-day computing. Much of the material I present, however, focuses on learning to work in a very different environment, that of the Unix and Unix-like systems upon which much of the Internet has been built. In particular, I focus on learning to work with Linux, a Unix-like operating system that is especially popular with Internet service providers (among others) for running web servers.

Learning to work with Linux means learning to work in the world of open source software. Open source software (http://www.opensource.org/) is a relatively new name for a relatively old phenomenon. It refers to software whose original instructions, or source code, are made freely available to anyone who uses that software. The opposite of open source is proprietary (or closed source) software, in which users have access only to the compiled binary form of the program—that is, the executable that actually runs on the computer.

Advocates of the open source development model claim many advantages for this approach. Open source developers are part of a voluntary, collaborative effort. Their goal is the creation of simple, flexible tools that are as useful as possible. Standards are open, and interfaces well documented. New features are added according to genuine need. Releases come early and often; bugs are identified and fixed in a matter of days, or even hours.

With proprietary software, say the open source crowd, one is dependent on a closed team of programmers who labor out of sight, insulated from the healthy effects of peer review and massively parallel debugging. Direction is determined by marketing committee. The goal is the maximization of profit, with user needs a sometimes-distant second. Standards that promote flexibility and user choice may be ignored, or even actively subverted.

At this point you may be thinking, who cares? I know I used to think that way. In my former existence as a nonprogramming user of DOS (and later, Windows and Macintosh computers), I dealt strictly with closed source software. Much of it was commercial software, some of it was shareware or freeware, but none of it came with source code included, and frankly, I didn’t care. I didn’t know how to program, so I wouldn’t have known how to modify it even if I’d had the source code, and I didn’t have a compiler to turn modified source code into an executable, anyway, so what was the point?

I could probably have gone on like this quite happily for the rest of my life, except for one thing: the Internet. While we Windows and Mac users were poking along contentedly in our proprietary, closed source world, a bunch of wild-eyed zealots in the research and academic community used the strengths of open source software to build a global computer network with mind-boggling capabilities. One especially impressive creation to come out of that effort was the World Wide Web, the largest open source development project in the history of computers.

Because I fell in love with the Web, and because I wanted to add my own creations to it, I found myself drawn increasingly into the world of open source software. In those days no one was selling closed source web publishing solutions. Instead, people were building their own solutions using things like the Unix shell and the Perl programming language. I wasn’t exercising a moral choice in following in their footsteps; I just wanted to put lots of useful information on the Web, and these were the tools people were using to do that.

For those embarking on that same journey today, though, there is a choice (or at least the appearance of one). In one camp are commercial vendors trying to convince you that you can do everything you need with proprietary, user-oriented applications. In the other camp are people like me, telling you that you don’t need to use shrink-wrapped software, that you can go further, and have more fun, by learning to build your own solutions with open source tools.

To return to the trailhead metaphor that began this chapter, the creation of a large-scale web site is like climbing a mountain. The proprietary software approach is like a shiny aerial tram: you buy your ticket, climb on board, and enjoy the view as you ride to the top. The open source approach is more like a rope, a hammer, and some pitons: the destination is the same, and you still get to enjoy the view along the way, but the experience is fundamentally different.

Consider the following: the tram passenger might see a lovely spot for a picnic on the way up, but only the climber can actually stop there. Once at the peak, when it becomes clear that this is actually only an outlying foothill, the tram passenger can only gaze wistfully at the real mountains looming beyond, while the self-sufficient climber can lace up the crampons and go. And of course, if you can’t afford the tram ticket, or if the tram breaks down halfway to the top. . .

Ultimately, you will have to make your own decision. I encourage you to give the open source approach a try, though. It is an approach that leads to empowerment and self-sufficiency. It sounds silly to say that open source software changed my life, but that’s basically what happened. It can do the same for you.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required