[26484] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8646 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 9 00:05:38 2005

Date: Tue, 8 Nov 2005 21:05:04 -0800 (PST)
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, 8 Nov 2005     Volume: 10 Number: 8646

Today's topics:
    Re: fork() or threads xhoster@gmail.com
        how to represent it via REL <huajian.luo@bsd.world>
    Re: how to represent it via REL <someone@example.com>
        Problems with while loop <john.dimper@nospam.com>
    Re: Problems with while loop <1usa@llenroc.ude.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 09 Nov 2005 00:09:51 GMT
From: xhoster@gmail.com
Subject: Re: fork() or threads
Message-Id: <20051108190951.547$e5@newsreader.com>

"Serge A. Ribalchenko" <_remove_diz_if_you_want_fisher@uch.net> wrote:

>
> Guys,
>
> I am really sorry I feel it can blow a flame, but I need an advice.
> Tomorrow I need to write a daemon which would create some outgoing tcp
> connections. 'Cause I just never did it before, I found myself in doubt
> what will be better to use - a pool of fork()-ed progs or use some nice
> module like "threads". The main requirement is speed. What should I use?

Speed of what?  Making new connections? Sending data over the existing
connections?

If the main requirement is speed, you should use C.  Other than that, if
you only have one CPU then for speed you should probably use nonblocking IO
rather than either forks or threads.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Wed, 9 Nov 2005 03:24:10 +0000 (UTC)
From: Huajian Luo<huajian.luo@bsd.world>
Subject: how to represent it via REL
Message-Id: <dkrq4q$q1m$1@news1nwk.SFbay.Sun.COM>

Hi there,

I need to state the following name convention by perl regular
expression.

"valid names are comprised of only alphanumeric characters
plus the characters '-', '_', and '.'.  Names must begin
with a letter.

I've tried the following function
sub valid_name{
   my $name = $_

   if ($name !~ /*[!a-zA-Z0-9_.-]* | [!a-zA-Z]*/) {
        print "Name $name is not valid";
   } else {
        print "MMMMMMMMMMMMMMMMMMMMM";
}
but it doesn't work.

Any hints on t his?
-- 
Thanks,

Huajian Luo.


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

Date: Wed, 09 Nov 2005 04:28:32 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: how to represent it via REL
Message-Id: <QVecf.97170$S4.70694@edtnps84>

Huajian Luo wrote:
> 
> I need to state the following name convention by perl regular
> expression.
> 
> "valid names are comprised of only alphanumeric characters
> plus the characters '-', '_', and '.'.  Names must begin
> with a letter.

$name =~ /\A[a-zA-Z][\w.-]*\z/;


John
-- 
use Perl;
program
fulfillment


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

Date: Wed, 09 Nov 2005 00:06:56 GMT
From: "John Dimper" <john.dimper@nospam.com>
Subject: Problems with while loop
Message-Id: <A4bcf.26888$j5.8547@fe1.news.blueyonder.co.uk>

Hi,

I'm having a problem with a while loop using ActiveState 5.8.7. Basically, 
if I pipe from standard in and do the following:

while (<>) {
  print "For Example";
}

it does nothing! If I open a file and while (<File>) this works without any 
problems.... I've never come across this on Unix/Linux machines. Is this an 
Activestate/Win32 problem or user error?

Many thanks,
John 




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

Date: Wed, 09 Nov 2005 00:11:50 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Problems with while loop
Message-Id: <Xns9708C34AA8DE0asu1cornelledu@127.0.0.1>

"John Dimper" <john.dimper@nospam.com> wrote in
news:A4bcf.26888$j5.8547@fe1.news.blueyonder.co.uk: 

> I'm having a problem with a while loop using ActiveState 5.8.7.
> Basically, if I pipe from standard in and do the following:
> 
> while (<>) {
>   print "For Example";
> }
> 
> it does nothing! If I open a file and while (<File>) this works
> without any problems.... I've never come across this on Unix/Linux
> machines. Is this an Activestate/Win32 problem or user error?

See if invoking the script as:

someprog | perl script.pl 

solves the problem. If so, I have encountered this before. It seems to 
be a Win32 issue.

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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


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