[12624] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 33 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 7 00:47:25 1999

Date: Tue, 6 Jul 1999 21:36:56 -0700 (PDT)
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, 6 Jul 1999     Volume: 9 Number: 33

Today's topics:
    Re: IO::Select and IO::Socket <streaking_pyro@my-deja.com>
    Re: IO::Select and IO::Socket (Anno Siegel)
    Re: IO::Select and IO::Socket (Abigail)
    Re: IO::Select and IO::Socket <streaking_pyro@my-deja.com>
    Re: IO::Select and IO::Socket smnayeem@my-deja.com
    Re: IO::Select and IO::Socket (Anno Siegel)
    Re: IO::Select and IO::Socket <gellyfish@gellyfish.com>
    Re: IO::Select and IO::Socket <streaking_pyro@my-deja.com>
    Re: IO::Select and IO::Socket smnayeem@my-deja.com
        Is it possible (some how) to "compile" a Perl script to (rogdh)
    Re: Is it possible (some how) to "compile" a Perl scrip (Matthew Bafford)
    Re: Is it possible (some how) to "compile" a Perl scrip (Abigail)
    Re: Is it possible (some how) to "compile" a Perl scrip (rogdh)
    Re: Is it possible (some how) to "compile" a Perl scrip (Abigail)
        Learning Perl Books (Mind Logic)
    Re: Learning Perl Books (brian d foy)
    Re: Learning Perl Books (Michboy832)
    Re: Learning Perl Books <m.nine.six@freesurf.ch>
        libwww  How do I set it up? <B@guestdirect.co.uk>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Sat, 03 Jul 1999 23:06:17 GMT
From: R.Joseph <streaking_pyro@my-deja.com>
Subject: Re: IO::Select and IO::Socket
Message-Id: <7lm514$fhl$1@nnrp1.deja.com>


>     % man perlipc
>     ....
>        Internet TCP Clients and Servers

Ok, I read the entire 30 pages of perlipc and still am no closer to
creating a server, using IO::Socket in Win32 that can handle multiple
connections.  The examples in perlipc all use fork(), which as everyone
knows by now, cannot be used in Win32.  Am I pretty much just screwed
until Active State releases a version of Active Perl that has an
emulation of fork(), or is there a better way!?  Please help...I really
need it!  Thanks to all who have helped already!

--
R.Joseph
http://www.24-7design.com
http://bowdown.to


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 4 Jul 1999 01:57:49 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: IO::Select and IO::Socket
Message-Id: <7lmf2t$kbs$1@lublin.zrz.tu-berlin.de>

R.Joseph  <streaking_pyro@my-deja.com> wrote in comp.lang.perl.misc:
>
>>     % man perlipc
>>     ....
>>        Internet TCP Clients and Servers
>
>Ok, I read the entire 30 pages of perlipc and still am no closer to
>creating a server, using IO::Socket in Win32 that can handle multiple
>connections.  The examples in perlipc all use fork(), which as everyone
>knows by now, cannot be used in Win32.  Am I pretty much just screwed
>until Active State releases a version of Active Perl that has an
>emulation of fork(), or is there a better way!?  Please help...I really
>need it!  Thanks to all who have helped already!

I don't know about better but you may want to look into select. It
allows you to split your attention between connections in a single task,
but that gets messy pretty soon.

Anno


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

Date: 4 Jul 1999 00:19:39 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: IO::Select and IO::Socket
Message-Id: <slrn7ntrmo.31h.abigail@alexandra.delanet.com>

R.Joseph (streaking_pyro@my-deja.com) wrote on MMCXXXII September
MCMXCIII in <URL:news:7lm514$fhl$1@nnrp1.deja.com>:
"" 
"" Ok, I read the entire 30 pages of perlipc and still am no closer to
"" creating a server, using IO::Socket in Win32 that can handle multiple
"" connections.  The examples in perlipc all use fork(), which as everyone
"" knows by now, cannot be used in Win32.  Am I pretty much just screwed
"" until Active State releases a version of Active Perl that has an
"" emulation of fork(), or is there a better way!?  Please help...I really
"" need it!  Thanks to all who have helped already!


Of course there's a better way. There isn't a single hardware platform on
which Win32 runs and for which there aren't multiple Unix OSses available,
all of which give you fork().

It's the less painful choice in the long run.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 04 Jul 1999 06:13:39 GMT
From: R.Joseph <streaking_pyro@my-deja.com>
Subject: Re: IO::Select and IO::Socket
Message-Id: <7lmu2f$lo2$1@nnrp1.deja.com>


> I don't know about better but you may want to look into select. It
> allows you to split your attention between connections in a single
task,
> but that gets messy pretty soon.
>
> Anno

So, I would select one socket, do whatever with that socket, then when
another connections comes in, use select again to select another
socket, and do whatever with that, then etc..etc??

--
R.Joseph
http://www.24-7design.com
http://bowdown.to


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Sun, 04 Jul 1999 08:42:27 GMT
From: smnayeem@my-deja.com
Subject: Re: IO::Select and IO::Socket
Message-Id: <7ln6pj$okr$1@nnrp1.deja.com>

In article <7lm514$fhl$1@nnrp1.deja.com>,
  R.Joseph <streaking_pyro@my-deja.com> wrote:
>
> >     % man perlipc
> >     ....
> >        Internet TCP Clients and Servers
>
> Ok, I read the entire 30 pages of perlipc and still am no closer to
> creating a server, using IO::Socket in Win32 that can handle multiple
> connections.  The examples in perlipc all use fork(), which as
everyone
> knows by now, cannot be used in Win32.  Am I pretty much just screwed
> until Active State releases a version of Active Perl that has an
> emulation of fork(), or is there a better way!?  Please help...I
really
> need it!  Thanks to all who have helped already!
ooh, so win32 doesnt allow forking? This is a shocking news to me... but
then, how do they make things like say yahoo pager, icq etc which must
make extensive use of forking to do things? or is it that perl in
particular doesnt support forking on win32 while all other languages
does?
Please clear me on this. I was hoping to build something similar to the
yahoo pager all using perl, but if this is the case, id be limited to
unixclients only and that might even make my whole project unfeasible!
:(
well thanks for any advice.
Nayeem


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 4 Jul 1999 19:24:05 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: IO::Select and IO::Socket
Message-Id: <7loccl$l0d$1@lublin.zrz.tu-berlin.de>

R.Joseph  <streaking_pyro@my-deja.com> wrote in comp.lang.perl.misc:
>
>> I don't know about better but you may want to look into select. It
>> allows you to split your attention between connections in a single
>task,
>> but that gets messy pretty soon.
>>
>> Anno
>
>So, I would select one socket, do whatever with that socket, then when
>another connections comes in, use select again to select another
>socket, and do whatever with that, then etc..etc??

Nope.  You're thinking of the other select.

When you have a special process for each connection you can afford
to hang (block) on an input socket until it gives you data, then
block at an output socket until it accepts your data and so on.
You leave it to the operating system to activate each process as
it becomes ready.

Now, if your (excuse for an, some might say) OS doesn't give you
that you need a way to wait for multiple sockets simultaneously
and react appropriately when one becomes ready.  That's basically
what the four-argument form of the select function does for you.
perldoc -f select is your friend.

Anyway, this way of handling multiple connections (probably
intermixed with a non-blocking form of accept() for good measure)
is pretty hard to get right.  So hard, in fact that you might
want to switch to Linus or something and be done with.

Anno


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

Date: 4 Jul 1999 22:42:26 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: IO::Select and IO::Socket
Message-Id: <7loo0i$4h3$1@gellyfish.btinternet.com>

On Sun, 04 Jul 1999 08:42:27 GMT smnayeem@my-deja.com wrote:
> ooh, so win32 doesnt allow forking? This is a shocking news to me... but
> then, how do they make things like say yahoo pager, icq etc which must
> make extensive use of forking to do things? or is it that perl in
> particular doesnt support forking on win32 while all other languages
> does?

No. Win32 has a different process creation model to Unix, the model
is sufficiently different that it makes a passable emulation difficult
to achieve with any degree of efficiency.  A perl that has been built
with cygwin32 will support fork but it is notoriously slow.  I will
be interested to see how the Activestate development in this direction
pans out.

If you need to create new processes in Win32 you might try out the
Win32 module function which has 'Process' in its name (I'm at home and
my home is an MS free zone - so I cant be more specific).

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Mon, 05 Jul 1999 04:59:27 GMT
From: R.Joseph <streaking_pyro@my-deja.com>
Subject: Re: IO::Select and IO::Socket
Message-Id: <7lpe3b$apc$1@nnrp1.deja.com>



>
> No. Win32 has a different process creation model to Unix, the model
> is sufficiently different that it makes a passable emulation difficult
> to achieve with any degree of efficiency.  A perl that has been built
> with cygwin32 will support fork but it is notoriously slow.  I will
> be interested to see how the Activestate development in this direction
> pans out.
>
> If you need to create new processes in Win32 you might try out the
> Win32 module function which has 'Process' in its name (I'm at home and
> my home is an MS free zone - so I cant be more specific).
>

So, would creating new processes be efficent enough to allow a server
that accepts, say 50 connections within a couple minutes to run fairly
quickly?  And can anyone else be more specific as to which module that
would be that Mr. Stowe was refering to?  Thanks!
--
R.Joseph
http://www.24-7design.com
http://bowdown.to


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 05 Jul 1999 09:11:05 GMT
From: smnayeem@my-deja.com
Subject: Re: IO::Select and IO::Socket
Message-Id: <7lpsr4$fjb$1@nnrp1.deja.com>

In article <7lpe3b$apc$1@nnrp1.deja.com>,
  R.Joseph <streaking_pyro@my-deja.com> wrote:
>
>
> >
> > No. Win32 has a different process creation model to Unix, the model
> > is sufficiently different that it makes a passable emulation
difficult
> > to achieve with any degree of efficiency.  A perl that has been
built
> > with cygwin32 will support fork but it is notoriously slow.  I will
> > be interested to see how the Activestate development in this
direction
> > pans out.
> >
> > If you need to create new processes in Win32 you might try out the
> > Win32 module function which has 'Process' in its name (I'm at home
and
> > my home is an MS free zone - so I cant be more specific).
> >
>
> So, would creating new processes be efficent enough to allow a server
> that accepts, say 50 connections within a couple minutes to run fairly
> quickly?  And can anyone else be more specific as to which module that
> would be that Mr. Stowe was refering to?  Thanks!
> --
> R.Joseph
> http://www.24-7design.com
> http://bowdown.to
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
I think Mr. Stowe is talking about the Win32::Process module in
particular. However I looked at the documentation for that module and
its not at all detailed, very brief documentation with very little
examples.
I still have some confusions though. One is how/where can I find some
good examples and documentations on these win32 modules. And like Mr.
Joseph said is it going to be fast enough? And also will the processes
inherit the parent's variables, like it happens with forking ? Otherwise
it will make life lot more harder for me to have all the variables
accessible by all children.
My other confusion was that if forking is so difficult on windows, how
does some applications, which should be making extensive use of forking,
work on windows? some examples would be say like on yahoo or ICQ, when a
new dialog opens between two users the yahoo/ICQ application opens up a
new process that handles communications between these two users while
retaining the main application with its own business. So with this
win32::Process module it seems I will have to start a totally
independent program to handle the dialog between the two users... which
is somewhat different than the idea of forking?
My main idea was to give my applications total (or almost total)
platform independency, and we simply cannot windows users because they
are so many and the majority of my users will be on windows... so anyone
has any hints or clues as to how the existing applications on Microsoft
platforms works? ... or is it that I would have to finally give up on
Perl and move to something else? (thats like armageddon to me, but still
if its the last choice...)

Thanks,

Nayeem
Programmer,
Agni Systems Ltd.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Sun, 04 Jul 1999 03:29:01 GMT
From: rogdh@iname.com (rogdh)
Subject: Is it possible (some how) to "compile" a Perl script to an .exe ?
Message-Id: <377ecda4.9140263@news.mindspring.com>

I want to take a scirpt to work that I've written.
However, I don't want to make the "source" available.
Is there a way to make a Perl app into an .exe?


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

Date: Sun, 04 Jul 1999 04:08:36 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: Is it possible (some how) to "compile" a Perl script to an .exe ?
Message-Id: <slrn7ntmr7.5fr.*@dragons.duesouth.net>

On Sun, 04 Jul 1999 03:29:01 GMT, rogdh) decided not to check the standard
documentation, and instead posted the following to comp.lang.perl.misc:
: I want to take a scirpt to work that I've written.
: However, I don't want to make the "source" available.
: Is there a way to make a Perl app into an .exe?

perldoc perlfaq3:
 ...
       How can I hide the source for my Perl program?
 ...

HTH,

--Matthew


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

Date: 4 Jul 1999 00:22:48 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Is it possible (some how) to "compile" a Perl script to an .exe ?
Message-Id: <slrn7ntrsl.31h.abigail@alexandra.delanet.com>

rogdh (rogdh@iname.com) wrote on MMCXXXIII September MCMXCIII in
<URL:news:377ecda4.9140263@news.mindspring.com>:
&& I want to take a scirpt to work that I've written.
&& However, I don't want to make the "source" available.

I've several programs of which I don't make the "source" (why is that
quoted? Isn't it not the real source, but a fake source?) available.
That's very easy. It's about as easy as not mailing you a stack of
bricks. You simply don't do it. Writing Perl doesn't mean your source
is automagically available to everyone. In fact, it's only available if
you give it away. If you don't want to do it, then don't!

Easy, isn't it?

&& Is there a way to make a Perl app into an .exe?


RTFFAQ.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 04 Jul 1999 08:04:03 GMT
From: rogdh@iname.com (rogdh)
Subject: Re: Is it possible (some how) to "compile" a Perl script to an .exe ?
Message-Id: <37811563.27507884@news.mindspring.com>

Abigail....
Are you stupid?


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

Date: 4 Jul 1999 10:12:21 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Is it possible (some how) to "compile" a Perl script to an .exe ?
Message-Id: <slrn7nuue2.31h.abigail@alexandra.delanet.com>

rogdh (rogdh@iname.com) wrote on MMCXXXIII September MCMXCIII in
<URL:news:37811563.27507884@news.mindspring.com>:
:: Abigail....
:: Are you stupid?

Yes. And you are the first person who hasn't figured that out by himself.


Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 06 Jul 1999 17:09:34 GMT
From: mike@mindlogic2.com (Mind Logic)
Subject: Learning Perl Books
Message-Id: <37823883$0$229@nntp1.ba.best.com>

Can anyone recommend some good books on learning Perl for the WWW? Currently I 
have the Lama book and the Perl for Dummies book coming to me mailorder. I'm 
looking for entry level books for beginners. What can you guys recommend?

Please CC any replys to me please.


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

Date: Tue, 06 Jul 1999 15:54:06 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Learning Perl Books
Message-Id: <brian-0607991554060001@sri.dialup.access.net>

In article <37823883$0$229@nntp1.ba.best.com>, mike@mindlogic2.com (Mind
Logic) wrote:

> Can anyone recommend some good books on learning Perl for the WWW?

if you must have such a book, i suggest anything by Lincoln Stein.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: 06 Jul 1999 19:49:05 GMT
From: michboy832@aol.com (Michboy832)
Subject: Re: Learning Perl Books
Message-Id: <19990706154905.11207.00002683@ng-xb1.aol.com>

I like Sam's Teach Yourself Perl in 21 Days by Laura Lemay...  It is written
much like a textbook is (with quizzes and exercises at the end of each chapter)
and is very organized.  It is for the true beginner.

Steve


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

Date: Tue, 06 Jul 1999 21:57:09 +0200
From: "m.nine.six" <m.nine.six@freesurf.ch>
To: Mind Logic <mike@mindlogic2.com>
Subject: Re: Learning Perl Books
Message-Id: <37825F95.3DFA056F@freesurf.ch>

for the beginning to lern perl just search the web for perl book. there
a few of them and buy a book for advanced user (i prefer the "advanced
perl programming" from www.ora.com). i think to so much money for a
beginner book that u will after one week is meaningless.

have a nice day,
alias m.nine.six....



Mind Logic wrote:
> 
> Can anyone recommend some good books on learning Perl for the WWW? Currently I
> have the Lama book and the Perl for Dummies book coming to me mailorder. I'm
> looking for entry level books for beginners. What can you guys recommend?
> 
> Please CC any replys to me please.


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

Date: Tue, 06 Jul 1999 20:30:57 GMT
From: "B" <B@guestdirect.co.uk>
Subject: libwww  How do I set it up?
Message-Id: <5Itg3.8904$dp1.211660@nnrp4.clara.net>

I have downloaded libwww-perl-5.43 (in tar archive).  When I looked at it
all I just got confused!  Where exactly do I upload these files to?  My
cgi-bin?  And do I need them all, if for example all I want to do is use, as
has been suggested in this ng,  LWP:SIMPLE to retrieve a web page.

Please help me at least go forward!

Thanks Bruce




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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 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.  

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 V9 Issue 33
************************************


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