[18006] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 166 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 29 09:05:30 2001

Date: Mon, 29 Jan 2001 06:05:10 -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: <980777110-v10-i166@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 29 Jan 2001     Volume: 10 Number: 166

Today's topics:
    Re: Catching warnings from Getopt::Std <james@NOSPAM.demon.co.uk>
    Re: closed filehandle error <bart.lateur@skynet.be>
    Re: closed filehandle error (Bernard El-Hagin)
        Handling Errors nicely (Matt Venn)
    Re: Handling Errors nicely <peb@bms.umist.ac.uk>
    Re: Handling Errors nicely tigra@sky.deep.ru
    Re: how do I use 'strict' and 'vars' <bart.lateur@skynet.be>
    Re: How to pass $vars to a script from within another s <tinamue@zedat.fu-berlin.de>
    Re: html link on perl created dynamic webpage <bart.lateur@skynet.be>
    Re: New way to learn Perl? <bart.lateur@skynet.be>
    Re: New way to learn Perl? <james@NOSPAM.demon.co.uk>
    Re: New way to learn Perl? <bart.lateur@skynet.be>
    Re: New way to learn Perl? <james@NOSPAM.demon.co.uk>
        Newbie Question:  Can I compile a Perl Script? <jhawks@yta.attmil.ne.jp>
    Re: Newbie Question:  Can I compile a Perl Script? (Bernard El-Hagin)
    Re: Newbie Question:  Can I compile a Perl Script? <carvdawg@patriot.net>
    Re: Newbie Question:  Can I compile a Perl Script? (Bernard El-Hagin)
    Re: Newbie Question:  Can I compile a Perl Script? <tinamue@zedat.fu-berlin.de>
    Re: Newbie Question:  Can I compile a Perl Script? <flavell@mail.cern.ch>
    Re: Passing object reference, while parsing XML <tinamue@zedat.fu-berlin.de>
    Re: Perl with Windows98 <bart.lateur@skynet.be>
        phonemes to syllable count routines? (James P. Salsman)
        Please Help <blnukem@hotmail.com>
    Re: Please Help <blnukem@hotmail.com>
    Re: Please Help <james@NOSPAM.demon.co.uk>
    Re: Problem renaming under Win32 <bart.lateur@skynet.be>
    Re: single quotes in a system call (Garry Williams)
    Re: stability of threads + interpreter performance <not@defined.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 29 Jan 2001 12:26:06 +0000
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: Catching warnings from Getopt::Std
Message-Id: <ant291206345fNdQ@oakseed.demon.co.uk>

In article <wl3g0i2hjwv.fsf@plume.nl.compuware.com>, Johan Vromans
<URL:mailto:JVromans@Squirrel.nl> wrote:
> 
> I assume for small/fast stuff you use assembler instead of Perl ;-)?

No I value my time more than the computer's. :-)

-- 
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02



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

Date: Mon, 29 Jan 2001 11:56:41 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: closed filehandle error
Message-Id: <9lma7tsbvevu5papd7e0vm9s7smclhf9cu@4ax.com>

Shane Lowry wrote:

>            I have a problem with a simple script that is driving my nuts.

	s/my/me/;

-- 
	Bart.


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

Date: Mon, 29 Jan 2001 12:17:38 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: closed filehandle error
Message-Id: <slrn97anr1.2q0.bernard.el-hagin@gdndev25.lido-tech>

On Mon, 29 Jan 2001 10:24:21 +1100, Shane Lowry
<whtwlf@NOSPAMoptushome.com.au> wrote:
>Hey Folk,
>  I have a problem with a simple script that is driving my nuts.

I vote this typo Typo-O-The-Month. ;-)

Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'


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

Date: Mon, 29 Jan 2001 11:21:18 +0000
From: matt@cipherdesign.com (Matt Venn)
Subject: Handling Errors nicely
Message-Id: <slrn97akhe.l5a.matt@flop.localnet>


Hey all,

I have just started using Perl to make my own modules. I was wondering if
anyone could offer tips/links on good ways to flow error conditions back
to the user - rather than just die-ing.

Is there a nice way of emulating Java's try catch mechanism? Subroutines
die, but are called from an eval block?

Thanks,

Matt

-- 
#!/usr/bin/perl
open(S,$0);while(<S>){if(/l(.*?$l)/x){
print chr($ Al+ $A+10*(length $1) +(length
>39?86:77));$l= $ l?'\$':'\(';}}print"\n";


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

Date: Mon, 29 Jan 2001 13:02:51 +0000
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: Handling Errors nicely
Message-Id: <3A7569FB.D003BE28@bms.umist.ac.uk>

> I have just started using Perl to make my own modules. I was wondering if
> anyone could offer tips/links on good ways to flow error conditions back
> to the user - rather than just die-ing.
> 
> Is there a nice way of emulating Java's try catch mechanism? Subroutines
> die, but are called from an eval block?


Have a look at the eval documentation 'perldoc -f eval'

this gives an idea as to how the eval statement can be used like Java's
try/catch.

HTH

Paul


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

Date: Mon, 29 Jan 2001 13:01:46 GMT
From: tigra@sky.deep.ru
Subject: Re: Handling Errors nicely
Message-Id: <953pjo$l7v$1@nnrp1.deja.com>

In article <slrn97akhe.l5a.matt@flop.localnet>,
  matt@cipherdesign.com wrote:
>
> Hey all,
>
> I have just started using Perl to make my own modules. I was wondering
if
> anyone could offer tips/links on good ways to flow error conditions
back
> to the user - rather than just die-ing.
>
> Is there a nice way of emulating Java's try catch mechanism?
Subroutines
> die, but are called from an eval block?

Yes. It works fine. E.g.:

my $data;
eval {
  open IN, $file or die "couldn't open because $!";
  local $/;
  die "it's empty!" unless $data = <IN>;
};

if($@) {
  warn "Error processing $file: $@";
  # Do some workaround
}

Sergey


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


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

Date: Mon, 29 Jan 2001 12:23:38 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: how do I use 'strict' and 'vars'
Message-Id: <u5oa7toa3h66go3crsjm5sa6phn030dck0@4ax.com>

Joel Nelson wrote:

>In my typical cgi scripts I have an '&initialize' subroutine I call
>right away.  It will declare global variables other subroutines will
>need to access.  When I use 'strict' I get a lot of :
>
>Global symbol $soAndSo requires explicit package name at scriptName.cgi
>line 22

Well, if you use $::soAndSo for the variable name, strict won't
complain. The variables themselves will be in package main:: . I think
it's a good way for them to stand out in the source (you can search for
them).

-- 
	Bart.


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

Date: 29 Jan 2001 13:37:30 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: How to pass $vars to a script from within another script and e-mail results to a group.
Message-Id: <953rmq$fuidm$7@fu-berlin.de>

hi,
creafin1998 <creafin1998@yahoo.com> wrote:

> Could you give an example or 2, please?  I'd like to see one using lwp. 
> This is a little advanced for me.  I wasn't able to get what I needed from
> the perldocs.

which part of
perldoc lwpcook was it you didn't understand?
i'm not writing down code here which is already written
down in the documentation.

tina

-- 
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx


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

Date: Mon, 29 Jan 2001 11:49:37 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: html link on perl created dynamic webpage
Message-Id: <rsla7t0operv9obne23dgqre5bsgn35fn0@4ax.com>

davidmonroe@my-deja.com wrote:

>print "\n<a href="http://www.atgl.spear.navy.mil/feedback/trnofmod.htm">View
>your submission here</a><br>";

You're trying to put quotes between quotes. 3 solutions:

 * Backslash the (literal) quotes:

	print "a quote: \"\n";

 * use qq with some otherwise unused delimiter (or pair):

	print qq[a quote: "\n];

 * use a here doc. For literal (multiline) HTML built into a script,
this is what I prefer, but the "downside" is that all of your strings
will now end in a newline:

	print <<"#END#";
	
	<a href="http://www.atgl.spear.navy.mil/feedback/trnofmod.htm">
	View your submission here</a><br>
	#END#

n.b. your end string, in this case "#END#", should be the *only* thing
on that line, so no blanks either on the left or on the right of it. It
should be identical to the thing you put between the quotes right after
the "<<". Oh, and do make sure that at least one more text line follows
in your script (due to a mysterious bug in Win32 perl, but a good idea
on any platform).

-- 
	Bart.


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

Date: Mon, 29 Jan 2001 11:52:20 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: New way to learn Perl?
Message-Id: <7bma7tca5b1h5atse06r3bpjlkpb5cku3b@4ax.com>

Studio 51 wrote:

>QUESTION: How would you initialize an array @a of length 100 to have all
>values equal -1.
>(a) for( $i=0; $i < 100; $i++ ) {$a[$i] = -1};
>(b) @a = (-1) x 100;
>(c) @a = map {-1} @a;

Uh... if you make the third one

	@a = map { -1 } 1 .. 100;

then all three are correct. Well, if $#a was at most 99 to begin with,
for (a).

-- 
	Bart.


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

Date: Mon, 29 Jan 2001 12:46:34 +0000
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: New way to learn Perl?
Message-Id: <ant291234bc8fNdQ@oakseed.demon.co.uk>

In article <7bma7tca5b1h5atse06r3bpjlkpb5cku3b@4ax.com>, Bart Lateur
<URL:mailto:bart.lateur@skynet.be> wrote:
>
> Studio 51 wrote:
> >
> > QUESTION: How would you initialize an array @a of length 100
> > to have all values equal -1.
> > (a) for( $i=0; $i < 100; $i++ ) {$a[$i] = -1};
> > (b) @a = (-1) x 100;
> > (c) @a = map {-1} @a;
> 
> Uh... if you make the third one
> 
>       @a = map { -1 } 1 .. 100;
> 
> then all three are correct.

If you assume from the question that @a is exactly 100 elements in size
(and that $[ = 0 and $#a = 99) then all three are correct anyway.

If you can't assume any of those pre-conditions, then only (b) is correct.

-- 
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02



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

Date: Mon, 29 Jan 2001 12:54:01 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: New way to learn Perl?
Message-Id: <gupa7t41moa6idfdccj0v9o4biou2up9qt@4ax.com>

James Taylor wrote:

>If you can't assume any of those pre-conditions, then only (b) is correct.

Oink? What is wrong with:

       @a = map { -1 } 1 .. 100;

?

That doesn't care:

 * about $[

 * whether @a was empty


-- 
	Bart.


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

Date: Mon, 29 Jan 2001 13:03:44 +0000
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: New way to learn Perl?
Message-Id: <ant291344313fNdQ@oakseed.demon.co.uk>

In article <gupa7t41moa6idfdccj0v9o4biou2up9qt@4ax.com>, Bart Lateur
<URL:mailto:bart.lateur@skynet.be> wrote:
>
> James Taylor wrote:
> >
> > If you can't assume any of those pre-conditions,
> > then only (b) is correct.
> 
> Oink? What is wrong with:
> 
>        @a = map { -1 } 1 .. 100;

Nothing, in fact that's the way I would do it, but that wasn't one
of the options given. Perhaps, I've picked up the wrong end of this
thread - I only noticed your last posting.

-- 
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02



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

Date: Mon, 29 Jan 2001 21:10:04 +0900
From: "James And Tess Hawks" <jhawks@yta.attmil.ne.jp>
Subject: Newbie Question:  Can I compile a Perl Script?
Message-Id: <953mfj$95p$1@newsflood.tokyo.att.ne.jp>

Is it possible to compile a Perl script so I can use it on computers without
Perl installed?




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

Date: Mon, 29 Jan 2001 12:15:04 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Newbie Question:  Can I compile a Perl Script?
Message-Id: <slrn97anlu.2q0.bernard.el-hagin@gdndev25.lido-tech>

On Mon, 29 Jan 2001 21:10:04 +0900, James And Tess Hawks
<jhawks@yta.attmil.ne.jp> wrote:
>Is it possible to compile a Perl script so I can use it on computers without
>Perl installed?

Why don't you RTFFAQ?

Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'


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

Date: Mon, 29 Jan 2001 07:45:23 -0500
From: H C <carvdawg@patriot.net>
Subject: Re: Newbie Question:  Can I compile a Perl Script?
Message-Id: <3A7565E3.F1BF225B@patriot.net>

http://www.perl2exe.com, if you're on Win32


> Is it possible to compile a Perl script so I can use it on computers without
> Perl installed?

I'll never understand why some people feel compelled to respond with
vulgarities,
such as "Why don't you RTFFAQ?" (what does the first "F" stand for??).  If you
must respond with vulgarities, why not either (a) not respond at all, or (b)
respond
directly to the OP, and NOT the 'group' at large?  After all, if someone hasn't
already
"RTFFAQ", or done a search for the answer, what makes you think that responding
that way will encourage them to do so next time?



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

Date: Mon, 29 Jan 2001 12:54:14 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Newbie Question:  Can I compile a Perl Script?
Message-Id: <slrn97apvi.2q0.bernard.el-hagin@gdndev25.lido-tech>

On Mon, 29 Jan 2001 07:45:23 -0500, H C <carvdawg@patriot.net> wrote:
>http://www.perl2exe.com, if you're on Win32
>
>
>> Is it possible to compile a Perl script so I can use it on computers without
>> Perl installed?
>
>I'll never understand why some people feel compelled to respond with
>vulgarities, such as "Why don't you RTFFAQ?"

Keep trying. And never say "never".

>(what does the first "F" stand for??).
	
It doesn't stand for anything. I stutter.
	
>If you
>must respond with vulgarities, why not either (a) not respond at all, or (b)
>respond directly to the OP, and NOT the 'group' at large?

Because if someone else with a similar question learns through such a reply
that the answer to the query is in the FFAQ (there goes that ddamn stutter
again) he/she won't bother the group with the same question.

>After all, if someone hasn't already "RTFFAQ", or done a search for 
>the answer, what makes you think that responding that way will encourage 
>them to do so next time?

If that someone learns that he/she won't get a different reply to a FAQ
he/she won't bother the group again with stupid questions (hopefully).

Isn't all of this painfully obvious? You don't need to be a genius to
figure all of this out for yourself, you know.

Now let's get back to Perl, hmmm?

Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'


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

Date: 29 Jan 2001 13:10:26 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: Newbie Question:  Can I compile a Perl Script?
Message-Id: <953q42$fuidm$6@fu-berlin.de>

hi,
H C <carvdawg@patriot.net> wrote:

> I'll never understand why some people feel compelled to respond with
> vulgarities,
> such as "Why don't you RTFFAQ?" (what does the first "F" stand for??).

"Fantastic"
what do you think...?
=)

-- 
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx


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

Date: Mon, 29 Jan 2001 14:41:05 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Newbie Question:  Can I compile a Perl Script?
Message-Id: <Pine.LNX.4.30.0101291438500.2051-100000@lxplus003.cern.ch>

On Mon, 29 Jan 2001, H C wrote:

> I'll never understand why some people feel compelled to respond with
> vulgarities,
> such as "Why don't you RTFFAQ?"

What's vulgar about the word "friendly"?

> (what does the first "F" stand for??).

It's all in the mind, you know.

Reminds me of the listener who called the BBC complaining that
someone on the radio was whistling an obscene song.




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

Date: 29 Jan 2001 11:26:42 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: Passing object reference, while parsing XML
Message-Id: <953k1i$fuidm$3@fu-berlin.de>

hi,
Thomas Theakanath <thomastk@prodigy.net> wrote:

> Using DOM module  I am trying to write a function that would basically
> return the text associated with an element node.
> At the last line of the calling program I get the following error:
> Can't call method "getFirstChild" without a package or object reference at
> ....

> sub getElementValue {

>   my $xx = @_;
>   my $nodexx = $xx->getFirstChild;   ######ERROR HAPPENS HERE

this doesn't work like zou expect.
in $x you have the number of elements in @_ now.
use
my ($xx) = @_;
instead.

hth,
tina


-- 
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx


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

Date: Mon, 29 Jan 2001 11:54:42 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Perl with Windows98
Message-Id: <aema7tglv7oa4v4tcv6u3ldrueldv4l3mg@4ax.com>

Mario wrote:

>However my friendly advice is to install Apache for windows.Despite of
>what you may think it is much more easy to make it work than the PWS.
>
>http://www.apache.org

My even more friendly advice is to install IndigoPerl
(<www.indigostar.com>) instead of ActiveState. That comes complete with
a working, configured, Apache server.

-- 
	Bart.


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

Date: Mon, 29 Jan 2001 13:03:47 GMT
From: bovik@best.com (James P. Salsman)
Subject: phonemes to syllable count routines?
Message-Id: <TSdd6.11365$1%2.522979@sjc-read.news.verio.net>

Given a string of phonemes (e.g., from the CMUDICT in the ARPABET), 
are there any routines published to count the number of syllables?
It doesn't matter if the result is integer only or not, as long as 
it is reliable and reasonably accurate. 

I thought I saw this in Perl sometime in the last few years but I 
can not remember where.  I tried Deja and Google.  Does Festival 
or any other voice synth have a routine such as this for prosody?

This is needed for the statistics from this ongoing data collection:

  http://www.bovik.org/reps-char.cgi

The results will be made available to all.  Thanks in advance!

Cheers,
James
--
http://www.bovik.org.


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

Date: Mon, 29 Jan 2001 12:11:18 GMT
From: "blnukem" <blnukem@hotmail.com>
Subject: Please Help
Message-Id: <G5dd6.33967$ek.5003259@news02.optonline.net>

Hi All

I need some guidance, I open an array with my values in it and print it to a
html drop box. It works fine except for the variables ( $description) that
it prints to HTML all contain a space after them except for the last one,
Why?

Here is my code:

open (CATEGORY,"<../category.dat");
@MAINCATEGORY=<CATEGORY>;
close (CATEGORY);

foreach $description (@MAINCATEGORY){
                                chomp($description);
print "<option value=\"$description\">$description</option>";
}





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

Date: Mon, 29 Jan 2001 12:48:53 GMT
From: "blnukem" <blnukem@hotmail.com>
Subject: Re: Please Help
Message-Id: <VEdd6.33976$ek.5024209@news02.optonline.net>


I fixed it it was the Internet Exporer caching the page before I added the
chomp function :)





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

Date: Mon, 29 Jan 2001 12:59:13 +0000
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: Please Help
Message-Id: <ant291213f7ffNdQ@oakseed.demon.co.uk>

In article <G5dd6.33967$ek.5003259@news02.optonline.net>, blnukem
<URL:mailto:blnukem@hotmail.com> wrote:
>
> I need some guidance, I open an array with my values in it and print it to a
> html drop box. It works fine except for the variables ( $description) that
> it prints to HTML all contain a space after them except for the last one,
> Why?

Must be something in your input data. Can you describe that for us?

> Here is my code:

Looks ok, but what is $/ set to, or haven't you changed it?

-- 
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02



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

Date: Mon, 29 Jan 2001 11:59:53 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Problem renaming under Win32
Message-Id: <3rma7t4p1783q6dcprop9gtbq30hpb8ro9@4ax.com>

"Richard Muller" <rlmuller(at)msn.(dot)(deletethis).com> wrote:

>          $RevisedName = s/WDJ-099/WDJ1999./i;

          ($RevisedName = $_) =~ s/WDJ-099/WDJ1999./i;

-- 
	Bart.


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

Date: Mon, 29 Jan 2001 11:13:42 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: single quotes in a system call
Message-Id: <Gfcd6.1611$GF2.52833@eagle.america.net>

On Mon, 29 Jan 2001 10:45:10 GMT, Garry Williams <garry@zvolve.com> wrote:
>On Mon, 29 Jan 2001 08:14:30 GMT, jdallega@my-deja.com
><jdallega@my-deja.com> wrote:
>
>Or it will work with only two quotes in there: 
>
>  system('find . -name foo* -mtime -1 -print');

That should be 

   system q(find . -name 'foo*' -mtime -1 -print);

for the two-quote version.  Sorry about that.  

(I told you that system call was picky. :-)  

-- 
Garry Williams


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

Date: Mon, 29 Jan 2001 11:29:26 GMT
From: "Koen Bossaert" <not@defined.com>
Subject: Re: stability of threads + interpreter performance
Message-Id: <qucd6.973$j4.50839@nreader2.kpnqwest.net>

> >>>>> "KB" == Koen Bossaert <not@defined.com> writes:
<snip>
>   KB> Is this the right way to do it?
>
> nope. you would first create a listen socket with IO::Socket (or roll
> your own which is a waste of time). then you create an read event on
> that listen socket. when it gets called back, you can do an accept and
> it won't block. that is a new client connection.

I see.

> i don't know your data polling needs so i can't tell if a simple timer
> loop is what you want. it may work.

A timer should suffice, yes.

> if it suffices, then your code for
> that is what you have there. the no unloop comments are meaningless.

Of course not, it was just my way to ask you 'I don't need an unloop,
right?'.

> you
> never unloop and this is effectively a daemon and runs forever. you
> could daemonize yourself (a module can do that for you) if you really
> want that.

Ok, thank you.

Koen



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

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


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