On Tue, Mar 12, 2002 at 06:53:15PM -0600, _brian_d_foy wrote:
> In article <[EMAIL PROTECTED]>, Chris Fedde 
><[EMAIL PROTECTED]> wrote:
> 
> > On Tue, 12 Mar 2002 09:37:54 -0600  _brian_d_foy wrote:
> >  +------------------
> >  | for your comments:
> >  | 
> >  | * removed the comments about backticks and cat.  not everyone has cat.
> >  +------------------
> > 
> > A note about portability sure, but perhaps not a complete whacking.
> 
> in general, should a shell script be used to answer a Perl question? a lot
> of people complained about the Unix bias in answers. *shrug*


I don't think we should get religious about using external programs.
There are many ways to read in a file, all with there pros and cons.
Backticking cat wins when it comes to tersity.

As for using two external processes, I've always thought that if the
command didn't contain shell metacharacters, the shell wasn't used at
all (why should it?). 'cat' is called, with the filename as argument.
Some quick testing suggests that this is indeed the case.

Perl is a glue language - cat is designed to read in a file and write
it to standard out. It would be very perlesque, and good programming
practise to glue and reuse what is there.

And just because there are people inflicting selfpain and using Windows,
that doesn't mean the FAQ should be unaware of the existance of Unix.


Abigail

Reply via email to