[17964] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 124 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 23 03:05:55 2001

Date: Tue, 23 Jan 2001 00:05:11 -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: <980237110-v10-i124@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 23 Jan 2001     Volume: 10 Number: 124

Today's topics:
    Re: [OT] Italic fonts too big (David H. Adler)
    Re: CGI - SSI <vivatexas@thesimpsons.com>
        CHECK CHILD <angenent@kabelfoon.nl>
    Re: CHECK CHILD (Garry Williams)
    Re: Directory Recursion Problem. (Tad McClellan)
    Re: Directory Recursion Problem. <chrisw@dynamite.com.au>
    Re: Directory Recursion Problem. <jdf@pobox.com>
    Re: Directory Recursion Problem. (Martien Verbruggen)
        FAQ .: Every post to the comp.lang.perl.misc newsgroup  <faq@denver.pm.org>
    Re: Getopt::Long question? (Johan Vromans)
    Re: Getopt::Long question? <remi@multiweb.nl>
    Re: hash table <Michael.Schlueter@philips.com>
        help with capturing output of open command tuoihong@my-deja.com
    Re: help with capturing output of open command <godzilla@stomp.stomp.tokyo>
    Re: help with capturing output of open command (Garry Williams)
        Internal counter required: was" Counting elements in an <me@jp1.co.uk>
    Re: Is there a fflush? (Tad McClellan)
        killfiling MS OUtlook (was: Directory Recursion Problem (Martien Verbruggen)
    Re: Perl Crashes on my Win2k Box <carvdawg@patriot.net>
    Re: Q: socket communication between perl and java <bas@integrators.demon.nl>
        spawning a process that is a perl program tuoihong@my-deja.com
    Re: spawning a process that is a perl program (Garry Williams)
    Re: spawning a process that is a perl program <godzilla@stomp.stomp.tokyo>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 23 Jan 2001 04:46:02 GMT
From: dha@panix2.panix.com (David H. Adler)
Subject: Re: [OT] Italic fonts too big
Message-Id: <slrn96q34a.rgl.dha@panix2.panix.com>

On 22 Jan 2001 11:51:58 -0500, Nevin Kapur <kapur@mts.jhu.edu> wrote:
>I'm using XEmacs 21.1.13 on Redhat 7.0. I've noticed that my italic
>fonts are too big compared to regular fonts, i.e. the *-i-* version of
>a font is bigger that the *-r-* version. This results in a lot a
>ugliness in general. I was wondering if anyone else has noticed this
>and if there is a fix. If not, how can I turn off *all* italic fonts?

Why in the world are you asking this in a perl newsgroup?

dha, boggling

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
I have 'somefunc' bound to the 'any' key.
	- Jim Flanagan, c.l.p.misc


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

Date: Mon, 22 Jan 2001 22:09:38 -0500
From: TonyB in VA <vivatexas@thesimpsons.com>
Subject: Re: CGI - SSI
Message-Id: <6962F938253383EA.D51C53E20E904657.09D36D251A14FB64@lp.airnews.net>

On Mon, 22 Jan 2001 17:00:53 +0100, Schrader
<wolfgang.schrader@off1.siemens.de> wrote:

>Hi,
>I get the actual server time in an html-Page using a ssi-perl-script.
>If I re-request this page, the cached version including the old, cached
>time will be displayed.
<snip>
>thanks in advance
>Wolfgang
>

Wolfgang, 

Try using the NO_CACHE Meta tag.




TonyB in VA


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

Date: Tue, 23 Jan 2001 06:39:29 -0800
From: "GOGAR" <angenent@kabelfoon.nl>
Subject: CHECK CHILD
Message-Id: <94j5ap$i4b$1@news.kabelfoon.nl>

Hi there,
Anybody knows how to see if a fork()'ed child process is still there?
thanx




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

Date: Tue, 23 Jan 2001 05:43:08 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: CHECK CHILD
Message-Id: <MR8b6.176$BQ1.5811@eagle.america.net>

On Tue, 23 Jan 2001 06:39:29 -0800, GOGAR <angenent@kabelfoon.nl> wrote:
>Anybody knows how to see if a fork()'ed child process is still there?
>thanx

print "alive" if kill 0, $pid;

-- 
Garry Williams


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

Date: Tue, 23 Jan 2001 04:16:58 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Directory Recursion Problem.
Message-Id: <slrn96pq3g.16b.tadmc@tadmc26.august.net>

Sean Meisner <sdmeisner@SPAMGUARDyahoo.com> wrote:
>Tad McClellan <tadmc@augustmail.com> wrote in message
>news:slrn96p3b2.1pi.tadmc@tadmc26.august.net...
>>
>>    % mungers
>>    Score:: -5000
>>            From: @.*spam
>>
>
>What does this mean?  I'm not a spammer.. what's a munger?
                                           ^^^^^^^^^^^^^^^^

One who munges, of course  :-)

   http://www.tuxedo.org/~esr/jargon/html/entry/munge.html

and the more directly applicable sense of the word is described in:

   http://www.tuxedo.org/~esr/jargon/html/entry/spamblock.html


I also have this rule, BTW:

   % mungers
   Score:: -1000
           From: spam.*@


Munging the right side of the @ makes such posts pretty much
invisible to me (I never "dip down" into the high negative
scores).

Munging the left side leaves you less than a 50/50 chance of
being seen, but at least there _is_ a chance. I very occasionally
read one with a -1000 score.

(of course, all of that can be overidden by the postive score
 that I give to topics that interest me. Yet another reason
 to consider carefully what you put in your Subject header.
 It may yank your article back into the visible range :-)
)


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


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

Date: Tue, 23 Jan 2001 16:20:40 +1100
From: "Chris W" <chrisw@dynamite.com.au>
Subject: Re: Directory Recursion Problem.
Message-Id: <8y8b6.82$Eu5.2880@news0.optus.net.au>


"Martien Verbruggen" <mgjv@tradingpost.com.au> wrote in message
news:slrn96otl0.bgr.mgjv@martien.heliotrope.home...
> I am going to killfile outlook express for good now. I'm just sick of
> the attitude that comes with it.

This seems to me to be banning the hammer because some people have managed
to bend nails with it.

Of course, you won't be reading this :)






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

Date: 23 Jan 2001 00:49:25 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: Directory Recursion Problem.
Message-Id: <ofwyvmvu.fsf@pobox.com>

"Chris W" <chrisw@dynamite.com.au> writes:

> "Martien Verbruggen" <mgjv@tradingpost.com.au> wrote in message
> news:slrn96otl0.bgr.mgjv@martien.heliotrope.home...
> > I am going to killfile outlook express for good now. I'm just sick of
> > the attitude that comes with it.
> 
> This seems to me to be banning the hammer because some people have managed
> to bend nails with it.

No, it's more like banning handguns because many people have committed
crimes with them.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Tue, 23 Jan 2001 18:04:33 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Directory Recursion Problem.
Message-Id: <slrn96qb81.n5q.mgjv@martien.heliotrope.home>

On 23 Jan 2001 00:49:25 -0500,
	Jonathan Feinberg <jdf@pobox.com> wrote:
> "Chris W" <chrisw@dynamite.com.au> writes:
> 
>> "Martien Verbruggen" <mgjv@tradingpost.com.au> wrote in message
>> news:slrn96otl0.bgr.mgjv@martien.heliotrope.home...
>> > I am going to killfile outlook express for good now. I'm just sick of
>> > the attitude that comes with it.
>> 
>> This seems to me to be banning the hammer because some people have managed
>> to bend nails with it.
> 
> No, it's more like banning handguns because many people have committed
> crimes with them.

Heh. I just used the same analogy in my reply. 

I wonder if we could get MS OUtlook made illegal in sensible countries
that already ban guns.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | You can't have everything, where
Commercial Dynamics Pty. Ltd.   | would you put it?
NSW, Australia                  | 


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

Date: Tue, 23 Jan 2001 07:17:01 GMT
From: PerlFAQ Server <faq@denver.pm.org>
Subject: FAQ .: Every post to the comp.lang.perl.misc newsgroup consumes the time and
Message-Id: <Ndab6.1224$B9.193146368@news.frii.net>

This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with every Standard Distribution of
Perl.

+
Every post to the comp.lang.perl.misc newsgroup consumes the time and
effort of readers all over the world who pay for their Internet access
just as you do. That's OK, because mutual support is what USENET is
all about. But it only works if posters check out other resources
first!

Please make an effort to find the answer to your question on your own
before posting. The resources below will help you.

BEFORE you post to this newsgroup, look at the following checklist:

1. The latest stable release of Perl is 5.6.0.  The latest maintenance
release of the 5.004 track is 5.004_05, for the 5.005 track is
5.005_03.  You can download them from
	http://www.cpan.org/src/
(look in ftp://ftp.perl.com/perl/ for a list of FTP-based mirrors)

2. comp.lang.perl.misc is for questions on the Perl language.  Try
comp.infosystems.www.authoring.cgi for questions on the CGI part of
CGI scripts.  The two leading blocks of reusable code for CGI purposes
are CGI.pm, at
	http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html
and cgi-lib.pl, at
	http://cgi-lib.berkeley.edu
You might also want to check out libwww-perl at
	http://www.linpro.no/lwp/
If you are having problems with a CGI script, look through
	http://language.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html

3. Are you using the following?
	#!/usr/bin/perl -w
	use diagnostics;
	use strict;
"-w" turns on all sorts of warnings about probable errors (see the
perldiag manpage), "use diagnostics" causes the "-w" warnings to be
explained in greater detail (with the explanations from the perldiag
manpage), and "use strict" generates compile and run-time errors for
certain unsafe variable, reference and subroutine constructs (see the
strict manpage)

4. Are you checking the return values from the functions built in to
perl?  Most of the file and system functions set $! and have return
values that you can test thus:
	open(PASSWD, "</etc/passwd") or
		die "error opening /etc/passwd: $!\n";
$! will contain an error message that will give you more information
on where your program is going wrong.  The perlfunc man page will give
you more information on the return values from functions.

5. Have you read the Perl FAQ?  Many questions on sockets programming,
an important and common problem with Solaris, text manipulation and
the jargon of perl are answered in the FAQ.  As well as being posted
regularly to comp.lang.perl.misc, the FAQ is on the web at:
	http://language.perl.com/faq/
 
6. Have you read the man pages?  Here are some subjects and the man
pages to look in:
	Objects		perltoot, perlref, perlmod, perlobj, perltie
	Data Structures	perlref, perllol, perldsc
	Modules		perlmod, perlsub
	Regexps		perlre, perlfunc, perlop
			http://www.perl.com/CPAN/doc/FMTEYEWTK/index.html
			(not a man-page but still useful)
	Moving to perl5	perltrap, perl
	Linking w/C	perlxstut, perlxs, perlcall, perlguts, perlembed
The man page for "perltoc" provides a crude table of contents for the
perl man page set.

7. Have you looked at http://www.perl.com ?  This is a great
online reference, with documentation, pointers to modules in the
Comprehensive Perl Archive Network (CPAN), articles on the inner
workings of many bits of Perl, and more.

7.5. Have you checked to see if a Perl module satisfies your needs?
Many reusable modules are available for immediate download and use.
See http://www.perl.com/CPAN/modules/00modlist.long.html for details.

8. Have you tried archives of Usenet?  http://www.dejanews.com/
maintains an archive of postings to Usenet dating from March, 1995.
Be sure to include "Perl" in your search.

9. The latest version of the "Camel Book" ("Programming Perl"),
updated for version 5.6.0, is available from your bookstore or from
http://www.ora.com/

10. Remember, USENET newsgroups are based on the idea of mutual aid.
USENET only works if we put as much into it as we get out of it.  Good
luck with your Perl work.

-Nathan Torkington, Perl mini-FAQ maintainer
- 

Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short.  They represent an important
part of the Usenet tradition.  They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.  If you are some how irritated by
seeing these postings you are free to ignore them or add the sender
to your killfile.  If you find errors or other problems with these
postings please send corrections or comments to the posting email
address.

If you are not able to find this or other Perl documentation from
your installation you may access it via the web by following the
appropriate links from one of the addresses listed below.

    http://theoryx5.uwinnipeg.ca/mod_perl/cpan-search
    http://www.perldoc.com
    http://www.cpan.org
    http://www.perl.com

Answers to questions about LOTS of other stuff, mostly not related to
Perl, can be found at

    news:news.answers

and in the many thousands of other useful Usenet news groups.

The perlfaq manual pages contain the following copyright notice.

  AUTHOR AND COPYRIGHT

    Copyright (c) 1997-1999 Tom Christiansen and Nathan
    Torkington.  All rights reserved.

    When included as an integrated part of the Standard
    Distribution of Perl or of its documentation (printed or
    otherwise), this work is covered under Perl's Artistic
    License.  For separate distributions of all or part of
    this FAQ outside of that, see the perlfaq manpage.

    Irrespective of its distribution, all code examples here
    are public domain.  You are permitted and encouraged to
    use this code and any derivatives thereof in your own
    programs for fun or for profit as you see fit.  A simple
    comment in the code giving credit to the FAQ would be
    courteous but is not required.

-- 
    This space intentionally left blank


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

Date: 23 Jan 2001 08:18:27 +0100
From: JVromans@Squirrel.nl (Johan Vromans)
Subject: Re: Getopt::Long question?
Message-Id: <wl3u26qag8s.fsf@plume.nl.compuware.com>

"paul" <remi@multiweb.nl> writes:

> my ($ip) = '';
> GetOptions('ip=s' => \$ip );
> print "The ip is $ip\n";
> my ($name) = '';
> GetOptions('name=s' => \$name );
> print "The name is $name\n";

Getopt::Long is designed to return all information at once. The right
invocation is:

 my ($ip) = '';
 my ($name) = '';
 GetOptions('ip=s' => \$ip, 'name=s' => \$name );
 print "The ip is $ip\n";
 print "The name is $name\n";

If you want to gather the values in multiple calls, configure
Getopt::Long to use passthrough mode:

 use Getopt::Long;
 Getopt::Long::Configure qw(passthrough);
 my ($ip) = '';
 GetOptions('ip=s' => \$ip );
 print "The ip is $ip\n";
 my ($name) = '';
 GetOptions('name=s' => \$name );
 print "The name is $name\n";

This opens the possibility that unrecognized options will go
unnoticed, so it is usually best to switch off passthrough mode before
the last call to catch all remaining options:

 use Getopt::Long;
 Getopt::Long::Configure qw(passthrough);
 my ($ip) = '';
 GetOptions('ip=s' => \$ip );
 print "The ip is $ip\n";
 # ...maybe more calls to GetOptions...
 my ($name) = '';
 Getopt::Long::Configure qw(nopassthrough);
 GetOptions('name=s' => \$name );
 print "The name is $name\n";

Happy hacking,

-- Johan
   Author and maintainer of Getopt::Long


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

Date: Tue, 23 Jan 2001 08:40:33 -0000
From: "paul" <remi@multiweb.nl>
Subject: Re: Getopt::Long question?
Message-Id: <lAab6.5290$ti1.473448@news.soneraplaza.nl>

Thnx anson that did the trick ...

grx paul

"Anson Parker" <ans@_nospam_x64.net> wrote in message
news:tj5b6.77889$xW4.600146@news-server.bigpond.net.au...
>
> paul <remi@multiweb.nl> wrote in message
> news:u13b6.4902$ti1.440318@news.soneraplaza.nl...
>
> > i have a question about Getopt::Long
> >[snip]
> > #!/usr/bin/perl -w
> >
> > use strict;
> > use Getopt::Long;
> >
> > my ($ip) = '';
> > GetOptions('ip=s' => \$ip );
> > print "The ip is $ip\n";
> >
> > my ($name) = '';
> > GetOptions('name=s' => \$name );
> > print "The name is $name\n";
> >
> > #########END############
> >
> > now the first options the script will take as -ip but when i start use
the
> > second option is give's me back the following
> >
> > [apache@at-home test]$ ./hash.pl -ip 10.10.10.10 -name
> > Unknown option: name <---
>
> I'm no expert on the Getopt modules but I did encounter a similar problem.
> I believe you can only call the GetOptions() function once - so if you
changed
> your code to the following it should work:
>
> #!/usr/bin/perl -w
>
> use strict;
> use Getopt::Long;
>
> my ($ip,$name) = '';
> GetOptions('ip=s' => \$ip,'name=s'=>\$name);
>
> print "The ip is $ip\n";
> print "The name is $name\n";
>
> #########END############
>
> Cheers,
>
> Anson.
>
> --
> foreach (unpack 'C*','aonjixfghklceyrqtuwxvdbpz') {
> print substr 'Jerk not the surreal chap!',$_-97,1;}
>
>




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

Date: Tue, 23 Jan 2001 08:55:37 +0100
From: "Michael Schlueter" <Michael.Schlueter@philips.com>
Subject: Re: hash table
Message-Id: <3a6d38fd$0$8791$4dbef881@businessnews.de.uu.net>

Hi,

Can you please give a simple example for the files of your situation?

My first guess was using grep.

Michael Schlueter




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

Date: Tue, 23 Jan 2001 03:15:26 GMT
From: tuoihong@my-deja.com
Subject: help with capturing output of open command
Message-Id: <94it0a$s6h$1@nnrp1.deja.com>

I have a piece of code that looks something like below:

   LOG ("Opening ftp connection to $server...");
   open (FTP, "|lftp $server\n");
   LOG ("Logging in as user $username...");
   print FTP "user $username $password\n";
   die unless defined ($pid = print FTP "ls $remote_dir\n");
   waitpid ("$pid", 0);
   LOG ("Making remote directory \"$remote_dir\"...");
   print FTP "mkdir $remote_dir\n";
   print FTP "cd $remote_dir\n";
   LOG ("FTP files from \"$upload_dir\" to \"$remote_dir\"...");
   print FTP "lcd $upload_dir\n";

   #$cmd = "mput *";
   die unless defined ($pid = print FTP "mput *\n");
   waitpid ("$pid", 0);
   close (FTP);

How do I capture the output of all the commands that I send to the FTP
handle?  I'm new at Perl, so Please help.

thank you


Sent via Deja.com
http://www.deja.com/


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

Date: Mon, 22 Jan 2001 20:17:41 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: help with capturing output of open command
Message-Id: <3A6D05E5.F7416D72@stomp.stomp.tokyo>

tuoihong@my-deja.com wrote:
 
> I have a piece of code that looks something like below:

(snipped unqualified code)

How do you expect people to help if
you do not post actual code? This
"looks something like" is a rather
innane way of displaying your code
or I should say, not displaying.
Post your actual code snippet, not
some pseudo facsimile of unqualified
accuracy.

> How do I capture the output of all the commands
> that I send to the FTP handle?

Print them to a log record.

Godzilla!


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

Date: Tue, 23 Jan 2001 04:25:37 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: help with capturing output of open command
Message-Id: <5J7b6.136$BQ1.5543@eagle.america.net>

On Tue, 23 Jan 2001 03:15:26 GMT, tuoihong@my-deja.com
<tuoihong@my-deja.com> wrote:
>I have a piece of code that looks something like below:
>
>   LOG ("Opening ftp connection to $server...");

Where is the definition of LOG()?  

>   open (FTP, "|lftp $server\n");
>   LOG ("Logging in as user $username...");
>   print FTP "user $username $password\n";
>   die unless defined ($pid = print FTP "ls $remote_dir\n");
>   waitpid ("$pid", 0);

Have you checked perlfunc to see what the print function returns?  I
guess not because it's _not_ a process ID.  

Since you seem to want to communicate with an FTP server from your
code, I would recommend that you consider the Net::FTP module.  It
will make life a lot easier.  

[ snip similarly confused code ]

>How do I capture the output of all the commands that I send to the FTP
>handle?  I'm new at Perl, so Please help.

I first thought about IPC::Open2(), but... 

The Net::FTP module will log lots of information for you, if you ask
it.  But better still, its methods will communicate the results of
commands sent to the server.  Check the Net::FTP manual page.  The
Net::FTP module *really* is what you want.  

-- 
Garry Williams


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

Date: Tue, 23 Jan 2001 04:30:06 -0000
From: "Jerry Pank" <me@jp1.co.uk>
Subject: Internal counter required: was" Counting elements in an array (foreach)"
Message-Id: <94j1ik$4db$1@uranium.btinternet.com>

Bernard El-Hagin <bernard.el-hagin@lido-tech.net> wrote in message
news:slrn96nsgl.2q0.bernard.el-hagin@gdndev25.lido-tech...
> On Mon, 22 Jan 2001 05:56:24 -0000, Jerry Pank <me@jp1.co.uk> wrote:
> >
> >Thanks for your time on this Jim.  Maybe I should have given a better
> >example (without numbers in the array) eg:
> >
> >my @words = qw(fizz buzz foo bar flurp frap);
> >my $i=0;
> >foreach my $word (@words) {
> >   print "3rd Word is $word\n" if $i == 2;
> >   $i++;
> >}
> >
> >My point is that I expected perl to have a `special' variable that I
could
> >use without having to resort to $i every time.
>
> Either you've chosen the wrong subject for your post (since you don't
> need to actually count elements in an array), you've chosen the wrong
> example to illustrate your question (since looping through an entire
> array just to print its third element is indubitably dubious) or you
> want to know whether there's an internal counter which you could access
> to find out which element of an array a loop is currently on. So which
> is it?

Doh. Number three please!
--
j
Jerry Pank <me@jp1.co.uk>






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

Date: Tue, 23 Jan 2001 03:39:40 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Is there a fflush?
Message-Id: <slrn96p7ub.v2.tadmc@tadmc26.august.net>

Jim Lynch <jwl@sgi.com> wrote:
>I'm using Perl on a Unix system and know about $|, but I'm trying to
                                          ^^^^^^^^  ^^^
>write a log file to other than standard out and would dearly love to
>have an fflush function.  


You can enable autoflush on filehandles other than STDOUT. 
It sounds like you think you cannot.


>I don't see it in the documents that I have
>anywhere.  


I'm having a really hard time believing you. You have posted to the
Perl newsgroup, so you have surely already done a word search of
the questions in the Perl FAQ, yes?  It seems you missed some.


   perldoc -q flush

Shows how to autoflush any filehandle.


>I'd sure like to be able to tail -f the log file to get an
>idea where the program is at any given time.  Does anyone have any
>suggestions?


   perldoc -q tail

      "How do I do a tail -f in perl?


Please look a little more carefully next time.


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


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

Date: Tue, 23 Jan 2001 18:03:28 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: killfiling MS OUtlook (was: Directory Recursion Problem.)
Message-Id: <slrn96qb60.n5q.mgjv@martien.heliotrope.home>

\begin{offtopic}

On Tue, 23 Jan 2001 16:20:40 +1100,
	Chris W <chrisw@dynamite.com.au> wrote:
> 
> "Martien Verbruggen" <mgjv@tradingpost.com.au> wrote in message
> news:slrn96otl0.bgr.mgjv@martien.heliotrope.home...
>> I am going to killfile outlook express for good now. I'm just sick of
>> the attitude that comes with it.
> 
> This seems to me to be banning the hammer because some people have managed
> to bend nails with it.

No. It's more like banishing guns, because too many people use them
incorrectly. It wasn't just this one that made me say what I said. It's
the enormously high correlation of the use of MS Outlook with
cluelessness, and especially the whinging when this cluelessness gets
corrected. It's the inane dotcom mentality that comes with those
crippled substitues for tools.

> Of course, you won't be reading this :)

Yes, I am. There are two reasons for this:

1 - You are following up to one of my articles. That scores up in almost
all cases. There are very few cases that will not become positive enough
to make it after that. Godzilla's posts, for example, never, for any
reason, make it past my filters.

2 - I realise fully well that a blanket kill based on a newsreader would
throw out many posts that I didn't want to target. I had the same
problem when I did this for posts originating from deja.com or through
supernews.com. Luckily my newsreader allows me to set up exceptions for
people.

Before I actuate a score that would kill articles (as opposed to just
score down), I monitor it for a while, which gives me a chance to put
exception rules in. I had already noticed your posts, and a few other
people's posts as coming from Outlook, but displaying none of the normal
pathology that comes with it. The score rule now looks like:

    % Broken newsreaders
    Score: -7777
        ~From: chrisw.*dynamite
        % removed rules to protect other people
        {::
            X-Newsreader: Microsoft Outlook Express
        }

In a few days I'll decide whether this rue is effective enough, and
whether I need to change the score level.


I just regularly reach a certain level of saturation with all the
cluelessness that leaks into this group. I lose, at a certain point, my
willingness to explain over and over again things that should be obvious
to anyone who follows standard Usenet etiquette. When I reach that
point, I have two options: Stay away from Usenet, or limit my exposure
to this crud. Since there is still, luckily, a little signal in the
noise that clp.misc has become, I opt for the second. If that is too
crude; pity. 

\end{offtopic}

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | For heaven's sake, don't TRY to be
Commercial Dynamics Pty. Ltd.   | cynical. It's perfectly easy to be
NSW, Australia                  | cynical.


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

Date: Mon, 22 Jan 2001 21:33:00 -0500
From: H C <carvdawg@patriot.net>
Subject: Re: Perl Crashes on my Win2k Box
Message-Id: <3A6CED5C.DDBC8A8A@patriot.net>

> >I am attempting to run a script and I get an
> >error that says Perl has generated an error
> >and must be shut down. Anybody have any
> >idea why this is?

Why bother speculating or even responding?  The OP gave no information
regarding Perl distro, and didn't even post the script.  There no info
on what
the error was, or who the script was run.

"I have a car.  It doesn't work.  Any ideas?"  Ah...duh!



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

Date: Tue, 23 Jan 2001 08:54:58 +0100
From: "Bas A. Schulte" <bas@integrators.demon.nl>
Subject: Re: Q: socket communication between perl and java
Message-Id: <bas-41F7B6.08545823012001@news.demon.nl>

Hi,

In article <3A6C6319.B1209A80@damtp.cam.ac.uk>, Bjorn Hassler 
<bh213@damtp.cam.ac.uk> wrote:

> THe reason why I want to do this is long,
> complicated
> and horrible, so let's just treat it as an exercise :-)

Sounds like you might want to checkout the fwdport example in the Perl 
CookBook. That is an exercise too; learning how to use your resources 
while programming ;)

Regards,

Bas.


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

Date: Tue, 23 Jan 2001 03:49:17 GMT
From: tuoihong@my-deja.com
Subject: spawning a process that is a perl program
Message-Id: <94iuvr$tog$1@nnrp1.deja.com>

I'm new to perl so please help.

I have a perl program (a scheduler) that runs forever and checks a
config for scheduled jobs (specifically another ftp program in perl).
What I want is for the scheduler to kick of the ftp program and not
wait for it to finish.  I have something like this.

         my $pid = fork;
         die "Can't fork: $!" unless defined $pid;

         if ($pid == 0) {
            #child

            # dissociate from process group
            if (POSIX::setsid == -1) {
               die "Can't setsid: $!";
            }

            # dissociate from controlling "terminal"
            open STDOUT, ">/dev/null";
            open STDIN, "/dev/null";

            # replace current program
            exec "perl $command"; # where command is ftp.pl
            die "Can't exec: $!";
         }
         print "Content-type: text/plain\n\n";
         print "Parent exiting ...\n";


the problem i have is that it does execute the ftp.pl but after that it
becomes a defunct process.  How can i fix this?


Sent via Deja.com
http://www.deja.com/


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

Date: Tue, 23 Jan 2001 04:36:47 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: spawning a process that is a perl program
Message-Id: <zT7b6.142$BQ1.5543@eagle.america.net>

On Tue, 23 Jan 2001 03:49:17 GMT, tuoihong@my-deja.com
<tuoihong@my-deja.com> wrote:
>I have a perl program (a scheduler) that runs forever and checks a
>config for scheduled jobs (specifically another ftp program in perl).
>What I want is for the scheduler to kick of the ftp program and not
>wait for it to finish.  I have something like this.
>
>         my $pid = fork;
>         die "Can't fork: $!" unless defined $pid;
>
>         if ($pid == 0) {
>            #child
>
>            # dissociate from process group
>            if (POSIX::setsid == -1) {
>               die "Can't setsid: $!";
>            }
>
>            # dissociate from controlling "terminal"
>            open STDOUT, ">/dev/null";
>            open STDIN, "/dev/null";
>
>            # replace current program
>            exec "perl $command"; # where command is ftp.pl
>            die "Can't exec: $!";
>         }
>         print "Content-type: text/plain\n\n";
>         print "Parent exiting ...\n";

Does the code call exit() here?  

>the problem i have is that it does execute the ftp.pl but after that
>it becomes a defunct process.  How can i fix this?
 ^^
 ^^
I assume you mean the ftp.pl process becomes defunct.  That would mean
that the parent does _not_ call exit (since init will inherit the
child and reap its status after a parent exits).  

You probably want to say `$SIG{CHLD} = 'IGNORE';' before calling
fork().  

-- 
Garry Williams


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

Date: Mon, 22 Jan 2001 20:37:28 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: spawning a process that is a perl program
Message-Id: <3A6D0A88.83D1DAD5@stomp.stomp.tokyo>

tuoihong@my-deja.com wrote:
 
> I have a perl program (a scheduler) that runs forever and checks a
> config for scheduled jobs (specifically another ftp program in perl).
> What I want is for the scheduler to kick of the ftp program and not
> wait for it to finish.  I have something like this.

(snipped code)

Something like this? Is this code you posted
your actual code or not? It is not a good idea
to post code if it is not the code you are
using and not the code with which you are having
problems. Post actual code if you want quality 
accurate help. Programming is not a guessing game.

 
> the problem i have is that it does execute the ftp.pl
> but after that it becomes a defunct process.  
> How can i fix this?

What are your indicators this ftp.pl is executing?
Clearly you are receiving data feedback of sorts
confirming execution. What is this data? Your
ftp.pl is executing, what evidence do you have
your problem is not actually caused by your
ftp.pl program?

Post actual code, post some factual data, post
something with which people can analyze and work.
It is not my intent to be rude but rather firm
but fair. It is annoying to open an article which
lacks any specific parameters and reliable info.


Godzilla!


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

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 124
**************************************


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