[11835] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 5435 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 21 00:07:29 1999

Date: Tue, 20 Apr 99 21:00:17 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 20 Apr 1999     Volume: 8 Number: 5435

Today's topics:
    Re: accepting input with space (Tad McClellan)
        Any visual editor for Perl: Win32? <jdurkin@gw.total-web.net>
    Re: C directives (Ronald J Kimball)
    Re: CGI programmer wanted (Tad McClellan)
    Re: FAQ 3.9: Is there an IDE or Windows Perl Editor? <theglauber@my-dejanews.com>
    Re: How do I SPAWN a child process? (fire and forget) <mtn@home.com>
        HTML into RTF??? <techhelp@outsource2000.com>
    Re: I need solid information (Abigail)
    Re: interesting hash problem (Ronald J Kimball)
        is it possible "UPDATE tables SET ... WHERE ... "? <okmail@hanmail.net>
        Perl fo win95 <igdaudt@conex.com.br>
        Perl fo win95 <igdaudt@conex.com.br>
    Re: Perl Script to append data to text file (Tad McClellan)
    Re: Perl vs. OTHER scripting languages ? When/Why to us <tringali@ed.ray.com>
    Re: Please Help !!!!! <jasjit@teleport.com>
    Re: Please Help !!!!! (Tad McClellan)
    Re: Please Help !!!!! (Tad McClellan)
    Re: Please Help !!!!! <wyzelli@yahoo.com>
        Problems installing mod_perl and embed_perl for apache! <mats.pettersson@falukuriren.se>
    Re: to match pattern ended with 4 digits (Tad McClellan)
    Re: Tool Reuse Considered Beneficial (was: New FAQ: How (Alan Barclay)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 20 Apr 1999 16:19:31 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: accepting input with space
Message-Id: <jgnif7.rh4.ln@magna.metronet.com>

seemas@my-dejanews.com wrote:

: Thanks for your reply,

   You're welcome, but you  _still_ haven't told us what 
   your problem is.


   [ And now you've got me all discombobulated and quoting in
     Jeopardy style.

     Please:

        1) quote only the parts that you are going to comment on

        2) put the comment _after_ the associated quoted part 

        3) do not quote signatures
  

     You should monitor

         news.announce.newusers

     for a few weeks to find out how to get the most from
     Usenet newsgroups...

   ]


: in my application I can accept space in input 


   What input?

   Where are you getting your input?

   From a file?

   From the keyboard?

   From another program?

   From a socket?

   From STDIN?

   From an environment variable?


: if the whole thing is quoted:
: e.g: "firstname lastname"

: so basically, I want to accept
: firstname lastname

: as input and pass it on as

: "firstname lastname"

: How can I do that.


   I still do not understand the question.

   Where is your code?

   If _you_ won't tell us where the input is coming from,
   maybe your code will  :-)



   The very best way to get answers to programming questions 
   is to come up with:

      A *short* and complete program that illustrates the problem.

      A description of what you wanted the program to do.

      A description of what the program is doing instead.


   When I get short of "newsgroup reading" time, I start
   skipping articles that do not have Perl code in them...



: In article <i3egf7.n53.ln@magna.metronet.com>,
:   tadmc@metronet.com (Tad McClellan) wrote:
: > seemas@my-dejanews.com wrote:
: >
: > : I'm a newbie to perl/cgi programming. How can I accept a firstname+lastname
: > : set with a space in the middle and pass it on as one quoted value.
: >
: >    The same way that you would accept input without a space.
: >
: >    Spaces in the input do not matter.
: >
: >    What is your real problem?


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Wed, 21 Apr 1999 01:51:11 GMT
From: "Jim Durkin" <jdurkin@gw.total-web.net>
Subject: Any visual editor for Perl: Win32?
Message-Id: <01be8b6f$dfbe6460$4d96bad1@jdurkin>

Hi, 

I'm a newbie to Perl.  Any visual editor commonly used with Perl on windows
NT?  

Also, can you guide me to any good websites that have network related Perl
scripts?

Thanks in advance,

Jim Durkin


------------------------------

Date: Tue, 20 Apr 1999 23:23:31 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: C directives
Message-Id: <1dqkysr.1qrbmy18zerx6N@p9.tc3.state.ma.tiac.com>

Tong <555034897s@acadiau.ca> wrote:

> In perlrun:
> 
> > -P 
> >      causes your script to be run through the C preprocessor before
> >      compilation by Perl. (Because both comments and cpp directives
> >      begin with the # character, you should avoid starting comments with
> >      any words recognized by the C preprocessor such as ``if'',
> >      ``else'', or ``define''.)
> 
> Could you explain it for me a little bit please, 'cause I'm learning
> Perl through man pages. 
> 
> Does that means that I can use 
> 
> #if $var == 3
> ...
> #else
> #endif

No, you can't do that.
#if $var == 3
is not a valid C preprocessor directive.


But you can do things like:

#define FOO
#ifdef FOO
 ...
#else
 ...
#endif


> or even "#include <...>" in my code? 

Yes, you can do that.


> What C preprocessor does it use then? How do i specify it? 

That's a good question.  I'm not sure.  :/


If you're on a Unix system, try `man cpp`.  Although the behavior of
that C preprocessor may not be exactly the same as the one used by Perl,
it should be close enough to tell you what you can do.


-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


------------------------------

Date: Tue, 20 Apr 1999 15:52:51 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: CGI programmer wanted
Message-Id: <julif7.rh4.ln@magna.metronet.com>

David Cassell (cassell@mail.cor.epa.gov) wrote:
: Abigail wrote:
: > 
: > Diablo Killuminati (diablo@livenet.net) wrote on MMLVII September
: > MCMXCIII in <URL:news:371a91da.11269790@news.erols.com>:
: > == I opperate a couple of new adult sites
: > 
: > Oh, a site full with new adults!


   It is a site for people who celebrated their 18th birthday
   the day before they visit the site.

   It's a rather high-turnover niche market, but it deserves
   to be exploited too.

   Everyone involved can get as rich as Bill without having to
   do anything as dirty as subversive marketing practices.

   :-)


: > ==                                            I am in need of a good CGI
: > == programmer.

: Of course, we all know that CGI == Perl.  
                              ^^^^^^^^^^^   

   I'm sure you meant:        CGI eq Perl


   == is for testing numeric equality.

   eq is for testing (bare word) string equality.  heh, heh.



: We learned that just this
: week in another thread.


   We are taught that CGI is indistinguishable from Perl
   several times a month, but we just don't get it.

   I fear we are just a bunch of slow learners...


: > Yes? And?  Your posting is a simple statement, with no Perl
: > content. Are you sure you have posted your entire article?

: Actually, there was a lot more, but the MIME-encoded nude pictures
: of Alyssa Milano and Pamela Anderson-Lee 


   I liked them ...


   ... my wife didn't.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Wed, 21 Apr 1999 01:37:54 GMT
From: The Glauber <theglauber@my-dejanews.com>
Subject: Re: FAQ 3.9: Is there an IDE or Windows Perl Editor?
Message-Id: <7fja5i$srj$1@nnrp1.dejanews.com>

In article <3719abd3@cs.colorado.edu>,
  perlfaq-suggestions@perl.com (Tom and Gnat) wrote:
> (This excerpt from perlfaq3 - Programming Tools
>     ($Revision: 1.35 $, $Date: 1999/04/16 01:38:05 $)
> part of the standard set of documentation included with every
> valid Perl distribution, like the one on your system.
> See also http://language.perl.com/newdocs/pod/perlfaq3.html
> if your negligent system adminstrator has been remiss in his duties.)
>
>   Is there an IDE or Windows Perl Editor?
>
>     If you're on Unix, you already have an IDE -- Unix itself. This
[...]

This is pretty funny, but shouldn't we be more helpful to the poor folks who
aren't fortunate enought to work in Unix all the time?

Glauber

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Wed, 21 Apr 1999 02:33:50 GMT
From: "Michael T. Naseef" <mtn@home.com>
Subject: Re: How do I SPAWN a child process? (fire and forget)
Message-Id: <371D390D.F70A5843@home.com>

You may need to close STDOUT, STDIN, and STDERR in the child or some subset
thereof.  I have had a problem that sounds similar to yours, and closing those
helped.

Mike Naseef

jrmorrill@yahoo.com wrote:

> I have a long lived Perl process. It serves out web pages. It goes up and stay
> running indefinately. However whenever a user connects to it a new instance is
> spawned, sends the output, then dies.
> This is working great!
>
> Now I have a new challenge.
>
> This long lived process needs to call a child process. The instance which
> calls this child process lives long enough to serve out a web page. But this
> child can take over an hour to return! Clearly it's not acceptable for
> Netscape to sit there spinning for an hour. SO I want to set up this child
> process and let it do whatever it needs for however long it needs and never
> return to the parent.
>
> I've tried exec and system ('myprog &') but both of them hang the long lived
> process.
>
> I guess I want to spawn a new parent process, not a child process. Any ideas?
>
> Thanks,
>   Jason
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own



------------------------------

Date: Tue, 20 Apr 1999 23:06:30 -0700
From: "Martin" <techhelp@outsource2000.com>
Subject: HTML into RTF???
Message-Id: <7fjf3f$n53$1@ramp2.tir.com>

Hello everyone,

Could anyone tell me if it is possible to make a script that would save HTML
page as RTF or formatted text file?

or is it possible to print pages by clicking a button (but the pages should
not include URL address nor the pages numbers)

Please help

Thank you

Martin
techhelp@outsource2000.com





------------------------------

Date: 21 Apr 1999 01:49:44 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: I need solid information
Message-Id: <7fjaro$22s$1@client2.news.psi.net>

Dan Barrett (danba@apexinteractive.com) wrote on MMLVIII September
MCMXCIII in <URL:news:371D0F28.B3D1E645@apexinteractive.com>:
 .. Anyone--that can post some solid references for programming/using/etc.
 .. sockets and ports (tcp sockets are the critical item here).


TCP/IP Illustrated, by Richard Stevens. All 3 volumes.



Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'


------------------------------

Date: Tue, 20 Apr 1999 23:23:33 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: interesting hash problem
Message-Id: <1dql01n.x4itcp6bf3nkN@p9.tc3.state.ma.tiac.com>

Soulier, Michael (EXCHANGE:SKY:1Z22) <msoulier@americasm01.nt.com>
wrote:

> Hey guys. I'm having an interesting confusion about hashes (well, it's
> interesting to me anyway). I was under the impression that I could add
> levels to a hash dynamically, all I wanted. For example, if I had:
> 
> my %myHash = ();
> 
>   I could say
> 
>   $myHash{'key1'} = 1;
> 
>   Then, I could later say
> 
>   $myHash{'key1'}{'key2} = 1;
> 
>   And continue all I wanted. I've been doing this for a while and never
> run into a problem, until now.

No, you can't do that.  If $myHash{'key1'} already has a value, then
$myHash{'key1'}{'key2'} uses a symbolic reference, so that if
$myHash{'key1'} is 1, then $myHash{'key1'}{'key2'} is the same as
$1{'key2'}.


Unfortunately, this means that if $myHash{key1} and $myHash{key2} both
have the value one, then %{$myHash{key1}} and %{$myHash{key2}} refer to
the *same* hash.


You are trying to use the hash value as a meaningful value on that
level, *and* as a reference to a deeper level of values.  That's a very
bad idea, as you've discovered.


Instead, push the meaningful value down a level, as in:

$hash{level1_key1}{value}       = 1;
$hash{level1_key1}{level2_key1} = { qw(more values) };

or:

$hash{level1_key1}[0] = 1;
$hash{level1_key1}[1] = { qw(more values) };


Conceptually, the structure is the same; you have nested hashes, with
values on each level.  It's just that each value is stored alongside the
next lower level, rather than directly above it.


HTH!

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


------------------------------

Date: Wed, 21 Apr 1999 11:04:14 +0900
From: =?euc-kr?B?udrBvrq5IChQYXJrLCBKb25nLVBvcmsp?= <okmail@hanmail.net>
Subject: is it possible "UPDATE tables SET ... WHERE ... "?
Message-Id: <7fjbtn$f0v$1@news2.kornet.net>

SSB0cmllZCBmb3IgdGhpcy4gYnV0IGZhaWxlZC4NCg0KJHN0aD0kZGJoLT5wcmVwYXJlKCINClVQ
REFURSB0YWJsZTEsIHRhYmxlMiBTRVQgbmFtZT0nTmFtZScsIGFkZHJlc3M9J3NvbWV3aGVyZScg
V0hFUkUgdGFibGUxLklEID0gdGFibGUyLklEDQoiKTsNCiRzdGgtPmV4ZWN1dGU7DQoNCg0KdGFi
bGUxIGhhdmUgbmV4dCBmaWxlZHMuDQppZCwgbmFtZQ0KDQp0YWJsZTINCmlkLCBhZGRyZXNzDQoN
CmJvdGggdGFibGUxLmlkIGFuZCB0YWJsZTIuaWQgaXMgcHJpbWFyeSBrZXkgYW5kIHJlbGF0aW9u
ZWQuDQoNCkhvdyBDYW4gSSBVcGRhdGU/DQoNClRoeC4NCg0KDQoNCg==



------------------------------

Date: Wed, 21 Apr 1999 00:06:25 -0300
From: "Igor Daudt" <igdaudt@conex.com.br>
Subject: Perl fo win95
Message-Id: <fgbT2.233$h35.3286@newsfeed.slurp.net>

    Do you know where can I download full version of perl for win95?? I'd
like to install that in my computer...

Igor Daudt
    igdaudt@conex.com.br




------------------------------

Date: Wed, 21 Apr 1999 00:06:25 -0300
From: "Igor Daudt" <igdaudt@conex.com.br>
Subject: Perl fo win95
Message-Id: <jibT2.235$h35.4101@newsfeed.slurp.net>

    Do you know where can I download full version of perl for win95?? I'd
like to install that in my computer...

Igor Daudt
    igdaudt@conex.com.br




------------------------------

Date: Tue, 20 Apr 1999 16:26:19 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl Script to append data to text file
Message-Id: <btnif7.rh4.ln@magna.metronet.com>

Ed Bogart (e.h.bogart@larc.nasa.gov) wrote:
: Uri Guttman wrote:

: > oh, why is our field so easy to enter? how many newbies are there in
: > medicine or accounting?
: > 
: > hey, that disease was covered in "liver infections for dummies". just pump
: > him full of amoxycillin. it seems to work on my dog.

: Or they may be experienced programmers who are new to Perl. Kinda like a
: proctologist delivering a baby. It's in their area of specialization
: but....
  ^^^
  ^^^  a real groaner of a pun.  Thanks!


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Mon, 19 Apr 1999 13:20:19 -0400
From: "Scott J. Tringali" <tringali@ed.ray.com>
Subject: Re: Perl vs. OTHER scripting languages ? When/Why to use it ?
Message-Id: <371B65D3.167E@ed.ray.com>

Michael Genovese wrote:

> I've been asked by my manager to come up with reasons, arguments,
> and/or guidelines for choosing one scripting language over another.
>
> Suggestions, people ?

1. MOST IMPORTANT: Perl comes with a built-in debugger.  It's always
there.  Try that with csh/awk/grep/sed/cut.  For this reason alone, it's
much easier to maintain.

2. Perl is much more well-defined and can be portable.  (For example, my
egrep takes this option, and yours doesn't- too bad!  Perl's functions
like grep() are consistent.)

3. Perl has features (-w, strict, diagnostics, English) that encourage
development of maintainable software, instead of monstrous hacks.  Try
putting all four on your next Perl script, and you'll be surprised how
much you learn.  You'll also be surprised how future maintainers will
write better code.

4. I believe it's *easier* to learn than awk/etc because all the
information is in one place: the Perl manual.  You don't have to
remember that this Unix function takes stdin, but this one takes a
filename, etc.

5. Perl has a huge library (better than any other language IMHO) of
modules that do almost anything you already need it do.  Why write a
script that wraps text when you can find in ten seconds on CPAN?

> I'm not saying PERL should be used for ALL scripts.

True..

> But I do think that any script of any size and/or complexity is
> probably better off in PERL than in C-SHELL and/or AWK/NAWK.

You're preaching to the choir here.  Good luck.

--
scott tringali                                tringali@ed.ray.com
up in yawn sex dressed arm eye hone, knot doze huff nigh implorer


------------------------------

Date: Tue, 20 Apr 1999 18:43:58 -0700
From: Jasjit Singh <jasjit@teleport.com>
Subject: Re: Please Help !!!!!
Message-Id: <371D2D5E.E68AA73E@teleport.com>

Thats wrong it actually should be

$email = "someone@somewhere.someplace";
$path_to_letter = "/tmp/file.txt";
system("mailx -s \"Email Subject\" $email < $path_to_letter");



Jasjit Singh wrote:
> 
> $email = "someone@somewhere.someplace";
> $message = "This is the body of the mail message.\n";
> system("mailx -s \"This is the subject line\" $email < $message");
> 
> ranjeev_s._pamnani@hud.gov wrote:
> >
> > Hi,
> >
> > I am new to perl and want to execute a unix command (mailx) from within perl.
> > Can anyone let me know how to invoke a unix command from within a perl script?
> >
> > Thanks in advance,
> > Ranjeev
> >
> > -----------== Posted via Deja News, The Discussion Network ==----------
> > http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own


------------------------------

Date: Tue, 20 Apr 1999 17:53:07 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Please Help !!!!!
Message-Id: <30tif7.8i4.ln@magna.metronet.com>

ranjeev_s._pamnani@hud.gov wrote:

: Can anyone let me know how to invoke a unix command from within a perl script?


      perldoc -f system

   or

      perldoc -f qx

   or

      perldoc -f open


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 20 Apr 1999 18:21:58 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Please Help !!!!!
Message-Id: <6muif7.1l4.ln@magna.metronet.com>

Jasjit Singh (jasjit@teleport.com) wrote:

: $email = "someone@somewhere.someplace";


   In string, @somewhere now must be written as \@somewhere at ...


[ snip rest of code. If the first line doesn't even compile,
  then the rest is not worth looking at...
]


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Wed, 21 Apr 1999 13:20:21 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Please Help !!!!!
Message-Id: <8WbT2.6$OA2.5258@vic.nntp.telstra.net>


Tad McClellan wrote in message <30tif7.8i4.ln@magna.metronet.com>...
>ranjeev_s._pamnani@hud.gov wrote:
>
>: Can anyone let me know how to invoke a unix command from within a perl
script?
>
>
>      perldoc -f system
>
>   or
>
>      perldoc -f qx
>
>   or
>
>      perldoc -f open
>
I tried all the above within my perl script and all I get are errors

HTIC

Wyzelli
;-)




------------------------------

Date: Wed, 21 Apr 1999 03:06:59 +0200
From: Mats Pettersson <mats.pettersson@falukuriren.se>
Subject: Problems installing mod_perl and embed_perl for apache!
Message-Id: <371D24B3.BA6147D1@falukuriren.se>

Hi!

I've just installed RedHat 5.2 with apache-1.3.3-1 and perl 5.004_04.

I downloaded mod_perl-1.19 and html-embperl-1_1_1.

The instalation instructions looked easy enough (same on both mod_perl
and embperl)...

+ perl Makefile.PL
+ make
+ make test (optional)
+ make install

The first time (mod_perl) complained about not finding the sources for
apache, so i downloaded the sources and tried again.

This time it compiled and did it's stuff happily (although the 'make
test' step complained about not finding LWP/UserAgent.pm), however all
other steps went ok.

Embperl compiled without error's, so happily i kill -s HUP:ed the
http-deamon and wrote a html test page like:

-- tags skipped --

Printing number:
[- $i=5 -] [- print $i -]

But apache happily ignored my effort and printed the above like any text
at all.

Can anybody please point me in the right direction?

Thanks!

Mats


------------------------------

Date: Tue, 20 Apr 1999 18:36:37 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: to match pattern ended with 4 digits
Message-Id: <lhvif7.1l4.ln@magna.metronet.com>

Xiaoyan Ma (xma@Haas.Berkeley.EDU) wrote:

: I have a Perl subsidiary file 


   What is that?


: sub init_type {
:               open (RECORDTYPES, "rtypes");

   1) don't ask for variable interpolation and backslash escapes
      unless you are going to *use* variable interpolation or
      backslash escapes. (use single quotes)


   2) you should always, yes *always*, I mean really, always
      check the return value from open() calls:

      open (RECORDTYPES, 'rtypes') || die "could not open 'rtypes'  $!";


:               while ($name = <RECORDTYPES>) {
                       ^^^^^

   Using global variables is Very Bad.

   You should avoid that.


:                $rtypes(substr($name,0,6)} = substr($name,7,2);
                                          ^
                                          ^
   There is the end of the while() loop's body.

   Why are you assigning to a while loop's block?


   [ I think I know why.

     Because you typed in that code instead of cut/paste, and
     you made a typo in the code that all of use are looking
     at, but the typo is not in the code that _you_ are
     looking at...

     In other words, you have wasted everybody's time,
     including your own since none of us can see the
     code that is giving you problems, because you did
     not give us the code. 

     You gave us an approximation of your code, so I'll
     approximate an answer:

         You have an error on line 17.

   ]


   Hopeless.

   Rest snipped without reading.

   Learn a little tiny bit of Perl, then post real code.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: 21 Apr 1999 03:46:34 GMT
From: gorilla@elaine.drink.com (Alan Barclay)
Subject: Re: Tool Reuse Considered Beneficial (was: New FAQ: How can I read in an entire file all at once?)
Message-Id: <924666387.792983@elaine.drink.com>

In article <MPG.11853f40497fdeef9898e2@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>In article <m3u2ucbb33.fsf@moiraine.dimensional.com> on 19 Apr 1999 
>14:37:52 -0600, Daniel Grisinger <dgris@moiraine.dimensional.com> 
>says...
>The POSIX standard for commands such as cat(1) fixes this problem, for 
>all platforms that comply.  Certainly all reasonably modern Unixes, plus 
>the MKS ToolKit for DOS/Windows.  I can't speak for any others, for lack 
>of hands-on knowledge.
>
>> You have no way of knowing exactly how the executable file
>> `cat' will act on any arbitrary system.  For all you know, the
>> user has a veterinary diagnostic program for felines under
>> that name.  Hope it does what you expect.
>
>See above.  It is expected to do what I expect.  :-)

POSIX does not (and can not) prevent the user from changing their
PATH to run their commands instead of POSIX defined ones.

While I agree it's not a bright idea to make 'cat' a veterinary
diagnositic program, I also know it's the exact sort of thing that
users do. I'd suggest that it's good software practice to try
not to rely on the user not doing something stupid.

However, I've noticed that this threat seems to have split into
system() people - who want to use the existing programs whenever
possible, and rewrite it people, who want to implement it themselves
in perl. Haven't we forgotten a third option - modules.

I'd personally want a module between my program and the shell command
in many cases, so I don't have to worry about differences between
different versions of ps, or the different ways to get the same
information without using ps.


------------------------------

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 5435
**************************************

home help back first fref pref prev next nref lref last post