[18352] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 520 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 18 18:05:54 2001

Date: Sun, 18 Mar 2001 15:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <984956708-v10-i520@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 18 Mar 2001     Volume: 10 Number: 520

Today's topics:
        "FormMail" with files uploading/sending NO_jean_SPAM@ematic.com
    Re: "FormMail" with files uploading/sending (Randal L. Schwartz)
    Re: (OFF TOPIC - IGNORE) Re: Beginners question please  <callgirl@la.znet.com>
    Re: (OFF TOPIC - IGNORE) Re: Beginners question please  <nospam@nospam.net>
        (OFF TOPIC - IGNORE) Re: Beginners question please help <godzilla@stomp.stomp.tokyo>
    Re: (OFF TOPIC - IGNORE) Re: Beginners question please  <principle@seekasonic.com>
    Re: -w and use strict; (Tad McClellan)
    Re: -w and use strict; <joehecht@code4sale.com>
    Re: about cgi <mikecook@cigarpool.com>
        ANNOUNCE: moodss-14.1 <jfontain@free.fr>
        Help using Text::Autoformat <nospam.don@adgweb.com>
    Re: How to start a non-terminating program from a CGI p (David Efflandt)
    Re: perl hacker wanted (Damian James)
        substitutions <sj@yahoo.com>
    Re: substitutions (Tad McClellan)
    Re: substitutions (Abigail)
        waitpid($pid,&WNOHANG) returns "Undefined subroutine &m <mnemotronic@mind\no-spam/spring.com>
    Re: waitpid($pid,&WNOHANG) returns "Undefined subroutin (Garry Williams)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 18 Mar 2001 11:47:20 +0000
From: NO_jean_SPAM@ematic.com
Subject: "FormMail" with files uploading/sending
Message-Id: <b189btcm4r1mfk14qjvjr5epo4vgf6c6ks@4ax.com>

Hi,

Where could I find a script allowing to send a form bymail (like the
famous formmail), but where the sender could attach a file with his
text ?

Thanks !

Jean Marcos
jean@


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

Date: 18 Mar 2001 13:11:22 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: "FormMail" with files uploading/sending
Message-Id: <m1zoein5ol.fsf@halfdome.holdit.com>

>>>>> "NO" == NO jean SPAM <NO_jean_SPAM@ematic.com> writes:

NO> Hi,
NO> Where could I find a script allowing to send a form bymail (like the
NO> famous formmail), but where the sender could attach a file with his
NO> text ?

One could adapt the code I wrote at

  <http://www.stonehenge.com/merlyn/WebTechniques/col46.html>

rather easily to allow some open fields, rather than be a fixed
payload to a fixed address.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


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

Date: Sun, 18 Mar 2001 14:59:40 -0800
From: Kira <callgirl@la.znet.com>
Subject: Re: (OFF TOPIC - IGNORE) Re: Beginners question please help on the verge  of throwing PC out the    window
Message-Id: <3AB53DDC.5BEA4517@la.znet.com>

Principle wrote:
 
(lots of snippage)

> Well Godzilla! just to sate you curiosity I'm dyslexic....

While earning my Masters degree and earning my Teaching
Credentials, both primary and secondary, there is a
requirement is to be met by all California trained
teachers, one requirement of numerous very rigorous
requirements. All California teachers must attend a
lengthy series of classes, a two year post-grad course,
which includes extensive studies of student related
illnesses, both physical and mental. Appropriately,
this course of study includes dyslexia. Over my many
years as an English and Science teacher, as a Professor
of English, I have developed quite a talent for spotting
those suffering dyslexia and, spotting those whom are not.

Incidently, I have read your dyslexia story before,
virtually word-for-word. However, different author.
Women, like elephants, have large hips, an equally
large memory and often prove to be just as nosey.


> ...like to continue this discussion in Russian....

My system is not enabled for Russian Cyrillic characters,
nor is yours. I've also read this "I speak Russian" story
before, a number of times.

Je parlerais plutôt français, si vous ne vous occupez pas. 
Cependant, je parlerais plutôt avec une personne honnête.


> ...but lets be honest what other reason could there
> possibility be.

* laughs *


Godzilla!


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

Date: Sun, 18 Mar 2001 20:56:47 GMT
From: "David Ehrens" <nospam@nospam.net>
Subject: Re: (OFF TOPIC - IGNORE) Re: Beginners question please help on the verge of  throwing PC out the    window
Message-Id: <ji9t6.19731$mH4.4446267@typhoon.ne.mediaone.net>

"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:3AB50E7C.1967E27F@stomp.stomp.tokyo...
 ...
> I am curious why your writing style, word arrangement,
> semantic syntax, relative temporal tense, punctuation,
> spelling and grammar, all have changed so dramatically
> between your first article and this article.

Maybe his cells change faster than every 7 years.





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

Date: Sun, 18 Mar 2001 11:37:32 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: (OFF TOPIC - IGNORE) Re: Beginners question please help on the verge of  throwing PC out the    window
Message-Id: <3AB50E7C.1967E27F@stomp.stomp.tokyo>

Principle wrote:
 
> Have solved the problem now thanks to Michael Carman and every one
> else that helped me.
 
> Thanks again its not easy as a non-programmer trying to learn
> something as complex as Perl for the first time, so the advice has
> been most helpful.
 
(snipped)

I am curious why your writing style, word arrangement,
semantic syntax, relative temporal tense, punctuation,
spelling and grammar, all have changed so dramatically
between your first article and this article.

Linguistic analysis indicates two different people wrote
these articles although I am certain this is not true
based upon more subtle personal language usage idioms.

Godzilla!


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

Date: Sun, 18 Mar 2001 21:27:44 +0000
From: Principle <principle@seekasonic.com>
Subject: Re: (OFF TOPIC - IGNORE) Re: Beginners question please help on the verge of throwing PC out the    window
Message-Id: <3q8abt45lusoudqbj66qu52srlovhita8l@4ax.com>

Well Godzilla! just to sate you curiosity I'm dyslexic and find it
very hard to express myself in this medium not so much because I can't
but the fact is my spelling and grammar are not exactly what you would
call exceptional so I tend to keep my phrasing simple as not to course
myself embarrassment.

Hope that clears it up for you although why you would be interested is
a mystery to me, as I have stated previously I have already received
all the help I need with this particular problem.

Surely this post was designed on your part to, how shall we say take
the piss and point out my grammatical mistakes and your own rather
limited intellectual capacity.

Just one other point English is not my first language ether although I
am indeed in England at the moment if you would like to continue this
discussion in Russian I would be more than happy to oblige you.

If my interpretation of your post was wrong I apologise in advance but
lets be honest what other reason could there possibility be.



On Sun, 18 Mar 2001 11:37:32 -0800, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote:

>Principle wrote:
> 
>> Have solved the problem now thanks to Michael Carman and every one
>> else that helped me.
> 
>> Thanks again its not easy as a non-programmer trying to learn
>> something as complex as Perl for the first time, so the advice has
>> been most helpful.
> 
>(snipped)
>
>I am curious why your writing style, word arrangement,
>semantic syntax, relative temporal tense, punctuation,
>spelling and grammar, all have changed so dramatically
>between your first article and this article.
>
>Linguistic analysis indicates two different people wrote
>these articles although I am certain this is not true
>based upon more subtle personal language usage idioms.
>
>Godzilla!




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

Date: Sun, 18 Mar 2001 14:05:52 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: -w and use strict;
Message-Id: <slrn9ba1og.1tg.tadmc@tadmc26.august.net>

Bart Lateur <bart.lateur@skynet.be> wrote:
>Tad McClellan wrote:
>
>>(Perl 4, its preferred version,  doesn't have "use warnings")
>
>Have you seen any of her code lately?


Of course not. Her code is in her postings. I don't see those.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 18 Mar 2001 20:22:07 GMT
From: "Joe C. Hecht" <joehecht@code4sale.com>
Subject: Re: -w and use strict;
Message-Id: <ON8t6.393$pP2.201702@paloalto-snr1.gtei.net>


> He is in love with me!

Hes not the only one ;)




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

Date: Sun, 18 Mar 2001 13:13:55 -0700
From: "Michael Cook" <mikecook@cigarpool.com>
Subject: Re: about cgi
Message-Id: <hG8t6.586$gu5.295247@news.uswest.net>

<snip>
> Write one script to accomplish all your tasks,
>
>
> print entry html
> username / password facility
> text entry facility
> submit / verification
> print new html
>
>
> Simple, yes?
>
> Godzilla!
</snip

I always try to do this whenever possible. Generally, I write the utility
itself and test, then I write a login script & test, then I wrap the utility
in the login script. Then I add to this as necessary. Much easier in steps,
I think...
    Michael
--
== CigarPool ==
http://www.cigarpool.com




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

Date: Sun, 18 Mar 2001 19:58:34 GMT
From: Jean-Luc Fontaine <jfontain@free.fr>
Subject: ANNOUNCE: moodss-14.1
Message-Id: <3AB5134E.1B1A84DC@free.fr>

Hi everybody: here is a new version of moodss.


Check it out! (or at least the screenshots at
http://jfontain.free.fr/moodss3.gif or
http://jfontain.free.fr/moodss4.gif :).


Notes:
- moodss modules can now be written in Python! Sample randpy and
minipy modules are provided. Documentation (see randpy.py file)
needs improving. Feedback is highly welcomed.
(modules can also be written in Perl, and Tcl of course)
- please let me know if you are interested in writing modules in
Ruby (I'm on a roll :-)

### CHANGES ###

--- version 14.1 ---
allow multiple concurrent Python modules (tclpython or tclpython2
  version 2.0.1 required)
implemented dynamic loading of Python modules
module programmers: module data display was updated even if updates
  counter was not increased, whereas now that condition is actually
  checked
cpustats module could fail with a division by zero error on repetitive
  updates
MySQL myvars module updated to support 3.23.34 and 3.23.35 servers

### README ###

This is moodss (Modular Object Oriented Dynamic SpreadSheet) version
14.1.

Moodss won in the Best System Admin Technology category (Tcl Tips and
Tricks, Valuable Real World Programming Examples) at the O'Reilly
Tcl/Tk 1999 Conference.
Linux Magazine calls it a "lifesaver".
Tucows gives it 5 stars (cows or penguins :-).

Moodss is a modular application. It displays data described and
updated in one or more modules, which can be specified in the command
line or dynamically loaded or unloaded while the application is
running. Data is originally displayed in tables. Graphical views
(graph, bar, 3D pie charts, ...), summary tables (with current,
average, minimum and maximum values) and free text viewers can be
created from any number of table cells, originating from any of the
displayed viewers. Thresholds can be set on any number of cells.

Specific modules can easily be developed in the Tcl, Perl and Python
scripting languages or in C.

A thorough and intuitive drag'n'drop scheme is used for most viewer
editing tasks: creation, modification, type mutation, destruction,
 ... and thresholds creation. Table rows can be sorted in increasing or
decreasing order by clicking on column titles. The current
configuration (modules, tables and viewers geometry, ...) can be saved
in a file at any time, and later reused through a command line switch,
thus achieving a dashboard functionality.

The module code is the link between the moodss core and the data to be
displayed. All the specific code is kept in the module package. Since
module data access is entirely customizable (through C code, Tcl,
Perl, Python, HTTP, ...) and since several modules can be loaded at
once, applications for moodss become limitless.
For example, thoroughly monitor a dynamic web server on a single
dashboard with graphs, using the Apache, MySQL, cpustats, memstats,
 ...  modules. If you have replicated servers, dynamically add them to
your view, even load the snmp module on the fly and let your
imagination take over...

Along with a core trace module, random, ps, cpustats, memstats,
diskstats, mounts, route, arp, kernmods, netdev, pci, system, MySQL
(myquery, mystatus, myprocs, myvars) modules for Linux, ping, snmp and
snmptrap for UNIX, apache and apachex modules are included (running
"wish moodss ps cpustats memstats" mimics the "top" application with a
graphic edge and remote monitoring capability).

Thorough help is provided through menus, widget tips, a message area,
a module help window and a global help window with a complete HTML
documentation.

Moodss is multi-langual thanks to Tcl internationalization
capabilities. So far only English and partially French are
supported. Help with other languages will be very warmly welcomed.

Development of moodss is continuing and as more features are added in
future versions, backward module code compatibility will be maintained.

I cannot thank the authors of the tkTable, BLT, MIME/SMTP and the HTML
libraries enough for their great work.

In order to run moodss, you need to install the following packages
(unless you can use the rpm utility, see below):
Tcl/Tk 8.3.1 or above, at (or at a mirror near you)
  http://dev.scriptics.com/ or ftp://ftp.scriptics.com/
the latest tkTable widget library at:
  http://www.hobbs.wservice.com/tcl/main.html
the latest BLT library at:
  ftp://tcltk.sourceforge.net/pub/tcltk/blt/
eventually the latest tclperl library for writing modules in Perl, or
the latest tclpython library for writing modules in Python at:
  http://jfontain.free.fr/
(see the INSTALL file for complete instructions, for UNIX and also
Windows platforms).

You also have the option of using the moodss rpm file (also in my
homepage), if you are using a Redhat Linux system (6.0 or above).
You can find the required tcl, tk, tktable, blt, tcpperl and other
rpms at: http://jfontain.free.fr/

Whether you like it (or hate it), please let me know. I would like to
hear about bugs and improvements you would like to see. I will correct
the bugs quickly, especially if you send me a test script (module code
with a data trace would be best).

###

you may find it now at my homepage:

http://jfontain.free.fr/moodss-14.1.tar.gz
http://jfontain.free.fr/moodss-14.1-1.i386.rpm
http://jfontain.free.fr/moodss-14.1-1.spec

and a bit later at:

ftp://contrib.redhat.com/ in libc6 sub-directory.

Enjoy and please let me know what you think.


--
Jean-Luc Fontaine  mailto:jfontain@free.fr  http://jfontain.free.fr/





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

Date: Sun, 18 Mar 2001 20:07:57 GMT
From: Don Higbee <nospam.don@adgweb.com>
Subject: Help using Text::Autoformat
Message-Id: <3AB5158C.2979C449@adgweb.com>


Looking for help with CPAN module Text::Autoformat
http://theoryx5.uwinnipeg.ca/CPAN/data/Text-Autoformat/Text/Autoformat.html

I am working on a script where I need to format a very long document and
I just can't get it right. I am no programmer by any stretch, more of a
hacker. I learned what I know from books, from other scripts, and a lot
of trial and error.

What I am looking for is if anyone has used this module and can provide
some clear examples, other than what is in the documentation. The
documentation is, shall we say, over my head. What I need to do is
center certain portions of the document, insert page breaks, and stop
the auto renumbering of the bulleted items (a feature of this module). I
have written the author, but he is out of the country and has not
responded.

If anyone can help, please let me know. It will be greatly appreciated.

Don Higbee




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

Date: Sun, 18 Mar 2001 20:55:11 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: How to start a non-terminating program from a CGI perl script
Message-Id: <slrn9ba85m.97e.efflandt@efflandt.xnet.com>

On Sat, 17 Mar 2001 22:26:23 GMT, Jambo <edinburghguy21@yahoo.com> wrote:
>I am wanting to start a Java program which basically runs as a server (this
>continues to ru, after the CGI script has finished and the web page has
>changed). I have a shell script server-side which calls this java program
>with the required parameters.

perldoc perlipc

search for daemon and then scroll back a bit to this title:
Complete Dissociation of Child from Parent

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


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

Date: 18 Mar 2001 22:47:28 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: perl hacker wanted
Message-Id: <slrn9baeng.b8h.damian@puma.qimr.edu.au>

Tad McClellan chose Sat, 17 Mar 2001 14:55:47 -0500 to say this:
>Joe Schaefer <joe+usenet@sunstarsys.com> wrote:
>
>>Fortunately, what you've written simply isn't true. Knitting a tapestry 
>>out of camel hairs isn't discussed in the charter, either.  
>
>How can I make my Camel's hair grow faster?
>

With a hash, of course :-).

Cheers,
Damian
-- 
@;=0..23;@;{@;}=split//,<DATA>;while(@;){for($;=@;;--$;;){next if($:=rand($;
+1))==0+$;;@;[$;,$:]=@;[$:,$;]}print map{$;{$_}}(@| ,@;);push@|,shift@;if$;[
0]==@|;$|=1;select$&,$&,$&,1/80;print"\b"x(@;+@|)}print"\n"__END__
Just another Perl Hacker


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

Date: Sun, 18 Mar 2001 19:41:22 GMT
From: james <sj@yahoo.com>
Subject: substitutions
Message-Id: <3AB51046.A7192B73@yahoo.com>

hi,all

i  try to substitute 1001 wtih 0001 in a file ( 1001 could located twice
or more in one line) .. example in a text file like this:

"url=http://www.site.com/image/1001.gif    src=...../1001.jpg "
i want it to be
"url=http://www.site.com/image/0001.gif    src=...../0001.jpg "
 now i am trying code like this one..not work.. ;-)

$file = "test.txt"
open(handle,"+<$file");

while(<handle>) {
    foreach $word (split) {

 if ($word=~ /1001/gi) {
    $word =~ s/1001/0001/;
    print"found $count times at $word\n";
    $counter++;
    print handle $word;  # i know i should modify this line somehow but
dont know how..
    }

so basically i just wanna find the word in a chunk and substitute only
the word..

any thoughts ??

James



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

Date: Sun, 18 Mar 2001 14:18:44 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: substitutions
Message-Id: <slrn9ba2gk.1tg.tadmc@tadmc26.august.net>

james <sj@yahoo.com> wrote:
>
>i  try to substitute 1001 wtih 0001 in a file ( 1001 could located twice
>or more in one line)

>open(handle,"+<$file");


You should use UPPER CASE filehandles.

You should always, yes *always*, check the return value from open():

   open(HANDLE,"+<$file") || die "could not open '$file' $!";

You cannot interleave reads and writes for the same filehandle
like you have below, that is why the file is not modified.


Perl FAQ, part 5:

   "How do I change one line in a file/
    delete a line in a file/
    insert a line in the middle of a file/
    append to the beginning of a file?"


Why don't you just do it as suggested in the FAQ?


>while(<handle>) {
>    foreach $word (split) {
>
> if ($word=~ /1001/gi) {
                     ^
                     ^

You should not include useless options.


>    $word =~ s/1001/0001/;
                         ^^ where's the 'g'?

You should not omit needed options  :-)

That s/// with change '99100177' into '99000177'. Is that what
you want it to do?


>    print"found $count times at $word\n";
                 ^^^^^^

Is that supposed to be $count or $counter?


>    $counter++;


You do not need to do the m// before the s///. if the pattern does
not match the s/// will not do anything.


   if ( $count_this_line = $word =~ s/^1001$/0001/g ) {
      $counter += $count_this_line;  # add to grand total      
      print "found $counter times at $word\n";
   }


>any thoughts ??


Yes. Check the Perl FAQ before posting to the Perl newsgroup as
required by netiquette.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 18 Mar 2001 20:43:56 GMT
From: abigail@foad.org (Abigail)
Subject: Re: substitutions
Message-Id: <slrn9ba7gc.a1n.abigail@tsathoggua.rlyeh.net>

james (sj@yahoo.com) wrote on MMDCCLVI September MCMXCIII in
<URL:news:3AB51046.A7192B73@yahoo.com>:
|| hi,all
|| 
|| i  try to substitute 1001 wtih 0001 in a file ( 1001 could located twice
|| or more in one line) .. example in a text file like this:
|| 
|| "url=http://www.site.com/image/1001.gif    src=...../1001.jpg "
|| i want it to be
|| "url=http://www.site.com/image/0001.gif    src=...../0001.jpg "
||  now i am trying code like this one..not work.. ;-)
|| 
|| $file = "test.txt"
|| open(handle,"+<$file");
|| 
|| while(<handle>) {
||     foreach $word (split) {
|| 
||  if ($word=~ /1001/gi) {
||     $word =~ s/1001/0001/;
||     print"found $count times at $word\n";
||     $counter++;
||     print handle $word;  # i know i should modify this line somehow but
|| dont know how..
||     }
|| 
|| so basically i just wanna find the word in a chunk and substitute only
|| the word..
|| 
|| any thoughts ??



perl -wi -ple 's/1001/0001/g' file



Abigail


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

Date: Sun, 18 Mar 2001 13:48:07 -0700
From: pt <mnemotronic@mind\no-spam/spring.com>
Subject: waitpid($pid,&WNOHANG) returns "Undefined subroutine &main::WNOHANG"
Message-Id: <3AB51F06.F7578C11@mindspring.com>

  I'm trying to shutdown (from within the parent) child processes
started with fork().  The fork() call saves the child process ID as a
value (not a key) in a global hash %HostList.  This is ActiveState 5.6.0
under W98SE.
  TIA.



 Here's the declaration for the CTRL-C handler:

---- cut here ----
# Catch CTRL-C (INT) signal.
use sigtrap qw(handler ctrlc INT QUIT) ;
---- cut here ----

Here's the actual sub

---- cut here ----
sub ctrlc()
{
   # stuff to stop child processes omitted.....

   for my $ProcId (values %HostList)
   {
      print "wait for process $ProcId \n" ;
      my $Child ;
      do
      {
         $Child = waitpid ($ProcId,&WNOHANG) ;
      } until ($Child == -1) ;
   }

}

---- cut here ----

Here's the error msg

---- cut here ----
wait for process -15899843
Undefined subroutine &main::WNOHANG called at PingMonster.pl line 111
(#1)

    (F) The subroutine indicated hasn't been defined, or if it was, it
    has since been undefined.

Uncaught exception from user code:
        Undefined subroutine &main::WNOHANG called at PingMonster.pl
line 111.
        main::ctrlc('INT') called at PingMonster.pl line 0
---- cut here ----

=


Remove the obvious anti-spam to reply.


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

Date: Sun, 18 Mar 2001 22:16:09 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: waitpid($pid,&WNOHANG) returns "Undefined subroutine &main::WNOHANG"
Message-Id: <slrn9bact9.d9h.garry@zfw.zvolve.net>

On Sun, 18 Mar 2001 13:48:07 -0700, pt
<mnemotronic@mind\no-spam/spring.com> wrote:

[snip]

>  Here's the declaration for the CTRL-C handler:
> 
> ---- cut here ----
> # Catch CTRL-C (INT) signal.
> use sigtrap qw(handler ctrlc INT QUIT) ;
> ---- cut here ----
> 
> Here's the actual sub
> 
> ---- cut here ----
> sub ctrlc()
> {

[snip]

>          $Child = waitpid ($ProcId,&WNOHANG) ;

[snip]

> ---- cut here ----
> 
> Here's the error msg
> 
> ---- cut here ----
> wait for process -15899843
> Undefined subroutine &main::WNOHANG called at PingMonster.pl line 111

[snip]

And here's the fix: 

  use POSIX ":sys_wait_h";

And here's the doc: 

  perlfunc, "waitpid"

-- 
Garry Williams


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

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


Administrivia:

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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V10 Issue 520
**************************************


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