Next: The backquote (`) operator
Up: Interacting with the Operating
Previous: Interacting with the Operating
  Contents
Perl's predecessors in the scripting world were primarily shell scripts.
These programs provided some programming constructs, but had very little
functionality built in to them; they were mostly
just a way to run other commands, see what they did, and then make a
decision about what to do next. While the ability to write scripts in this
way is definitely very useful, the idea of firing off many programs from a
script to achieve a sometimes simple goal is very inefficient. One of the
things that perl tries to do is to have some of the functionality of many
other programs, so that it can get the job done without relying on lots of
outside programs. Still, there are times when running an operating system
command is either necessary, or at least the easiest solution to a problem
at hand.
We've already seen one way to interact with the operating system in the
discussion of filehandles (Section
). By preceding a filename
with the ``pipe'' symbol (|
), we can send input to a program running
independently of perl, and by following a filename with the symbol, we can read
input from a program. Perl also offers a number of other ways of interacting
with the operating system, as the following sections will outline.
Next: The backquote (`) operator
Up: Interacting with the Operating
Previous: Interacting with the Operating
  Contents
Phil Spector
2002-10-18