On Fri, Mar 28, 2003 at 12:38:10PM +1200, Sascha Beaumont wrote:
> On Fri, 2003-03-28 at 08:34, Jim Cheetham wrote:
> > #!/usr/bin/perl -w
> > use strict;
> > open QUOTE, "quotes" or die "Quote file unreadable!";
> > while (<QUOTE>) { print; }
> >
> Well if you're going to script it you could always bash it out ;)
>
> #!/bin/sh
> if [[ -r quotes ]] ; then
> cat quotes
> else
> echo "Quotes file unreadable"
> fi
Hmmm ... "script" is an ambiguous word. I think you were using it to
suggest a simplistic and restricted solution, which is what that shell
script provides.
Small perl programs are often called scripts, because they're short,
but there's just as much flexibility in there as in C ...
However, shell scripts can do huge amounts of processing and to be
honest, I more often write a bash script than I do a perl program,
because I know the set of standard unix commands rather well. It's just
a matter of choosing whatever language you're happiest with, I guess.
-jim