[12680] in Perl-Users-Digest
Perl-Users Digest, Issue: 89 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 9 10:10:19 1999
Date: Fri, 9 Jul 1999 07:05:08 -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 Fri, 9 Jul 1999 Volume: 9 Number: 89
Today's topics:
Re: Cookies won't work (Andreas Fehr)
Re: Cookies won't work <tchrist@mox.perl.com>
Re: Cookies won't work (Andreas Fehr)
Re: Deleting everything after a pattern? (Abigail)
Re: Deleting everything after a pattern? <tchrist@mox.perl.com>
Re: Emulating C++ Class Templates (M.J.T. Guy)
Re: Emulating C++ Class Templates <tchrist@mox.perl.com>
Re: ftp (Abigail)
Re: ftp <ianmorty@nortelnetworks.com>
Hacker fouls off All-Star site (John Klassa)
Re: Help!: trying to compile my scripts (Abigail)
Re: perlscript in IE <gellyfish@gellyfish.com>
Re: perlscript in IE <tchrist@mox.perl.com>
please help regex! hamed53@my-deja.com
Re: Polling sockets (Lars Gregersen)
Re: Program for Easy Writing of Perl Code <mikecard@my-deja.com>
Re: Program for Easy Writing of Perl Code (Abigail)
Re: Program for Easy Writing of Perl Code <gellyfish@gellyfish.com>
Re: Question: Good Project? <cllajoie@mtu.edu>
Re: Question: Good Project? <gellyfish@gellyfish.com>
Re: Self-referencing hash? Ick? (M.J.T. Guy)
Re: toturial <mikecard@my-deja.com>
Re: Using perlcc to compile a perl prog (Abigail)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 09 Jul 1999 13:07:46 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Cookies won't work
Message-Id: <3785f178.27259567@news.uniplus.ch>
On Fri, 09 Jul 1999 14:26:11 +0200, Frank de Bot <debot@xs4all.nl>
wrote:
>I'm trying for over 3 days to set cookies. But it never worked. I've
>already used cgi.pm and CGI::Cookies . I've read very carefully the
>description. Can anyone give me an examples that WILL work?
>
>
>
>--
>Contact Information:
>
> \\\|///
> \\ - - //
> ( @ @ )
>----------------------oOOo-(_)-oOOo--------------------|
>| General: |
>| |
>| EMAIL: debot@xs4all.nl |
>|------------------------------------------------------|
>| Penpal International |
>| |
>| URL: http://www.debot.nl/ppi/ or http://fly.to/ppi |
>| EMAIL: debot@xs4all.nl or ppi@debot.nl |
>-------------------------------Oooo---------------------
> oooO ( )
> ( ) ) /
> \ ( (_/
> \_)
>
>
I was successful with the following, but I'm sure there
are other ways to get there...
#!path to perl -w
use CGI;
use strict;
# get cgi object
my $cgi = new CGI;
my $COOKIE_NAME = "CookieName";
# get cookie from client
my $cookie_value = $cgi->cookie($COOKIE_NAME);
# if it is set (cookie returned from client
if ($cookie_value)
{
# reset it with new/other value
$my_cookie = $cgi->cookie(-name=>$COOKIE_NAME,
-expires=>'+2h',
-value=>$cookie_value);
}
else
{
# no cookie returned (cookie turned of or first cookie)
$my_cookie = $cgi->cookie(-name=>$COOKIE_NAME,
-expires=>'+2y',
-value=>"blah blah");
}
print $cgi->header(-cookie=>$my_cookie);# print cgi header
Andreas
------------------------------
Date: 9 Jul 1999 07:52:06 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Cookies won't work
Message-Id: <3785fe86@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, backwards.saerdna@srm.hc (Andreas Fehr) writes:
:On Fri, 09 Jul 1999 14:26:11 +0200, Frank de Bot <debot@xs4all.nl>
:wrote:
Why oh why oh why did you quote all 29 lines of that posting, including
the offensively long signature? This just isn't the way things are done.
Either you need to learn about expected standards on Usenet, or theres'
a bug in your newsreader, or both.
--tom
--
It's all magic. :-) --Larry Wall in <7282@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: Fri, 09 Jul 1999 14:03:54 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Cookies won't work
Message-Id: <3786005d.31072279@news.uniplus.ch>
On 9 Jul 1999 07:52:06 -0700, Tom Christiansen <tchrist@mox.perl.com>
wrote:
> [courtesy cc of this posting mailed to cited author]
>
>In comp.lang.perl.misc, backwards.saerdna@srm.hc (Andreas Fehr) writes:
>:On Fri, 09 Jul 1999 14:26:11 +0200, Frank de Bot <debot@xs4all.nl>
>:wrote:
>
>Why oh why oh why did you quote all 29 lines of that posting, including
>the offensively long signature? This just isn't the way things are done.
>Either you need to learn about expected standards on Usenet, or theres'
>a bug in your newsreader, or both.
>
To show him his offensive signature! As I remember, I normally
cut that stuff, but this one was so cute, I had to spread this
one.
BTW, wasn't there any discussion whether a signature starts
with '--' or with '-- '?
Andreas
------------------------------
Date: 9 Jul 1999 08:40:12 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Deleting everything after a pattern?
Message-Id: <slrn7obuqn.h7.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMCXXXVIII September
MCMXCIII in <URL:news:3786e2c1.16967101@news.skynet.be>:
&&
&& Benchmark! Use the benchmark, Luke!
&&
&& use Benchmark;
&& $text = 'abcdefghibklm';
&& timethese(10000, {
&& GREEDY => sub { $text =~ /a.*b/ },
&& FRUGAL => sub { $text =~ /a.*?b/ },
&& });
&& __END__
&& Benchmark: timing 10000 iterations of FRUGAL, GREEDY...
&& FRUGAL: 4 wallclock secs ( 4.40 usr + 0.00 sys = 4.40 CPU)
&& GREEDY: 5 wallclock secs ( 4.56 usr + 0.00 sys = 4.56 CPU)
&&
&& Oh yeah. Tiny difference (less than 4%), but in the direction I
&& expected.
Oh dear oh dear. Yet another example of the dangers of Benchmark. Too
many people run Benchmark with one example and draw conclusions from that.
#!/opt/perl/bin/perl -w
use strict;
use Benchmark;
my $text = 'a'. ('x' x 1000) . 'b';
timethese(100000, {
GREEDY => sub { $text =~ /a.*b/ },
FRUGAL => sub { $text =~ /a.*?b/ },
});
__END__
Benchmark: timing 100000 iterations of FRUGAL, GREEDY...
FRUGAL: 19 secs (17.50 usr 0.00 sys = 17.50 cpu)
GREEDY: 1 secs ( 2.33 usr 0.00 sys = 2.33 cpu)
Analyse, people, _analyse_. Think what the regex machine is doing.
That beats a benchmark every day.
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== 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: 9 Jul 1999 07:59:11 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Deleting everything after a pattern?
Message-Id: <3786002f@cs.colorado.edu>
In comp.lang.perl.misc, abigail@delanet.com writes:
:Oh dear oh dear. Yet another example of the dangers of Benchmark. Too
:many people run Benchmark with one example and draw conclusions from that.
I hate that. I once wrote an article explaining why Benchmark is
terribly deceptive. That article follows.
In comp.lang.perl.misc, Tk Soh <r28629@email.sps.mot.com> writes:
:#!/usr/local/bin/perl -w
:use Benchmark;
:
:$x = " Here goes nothing one space now\t\fend\nhere";
:
:timethese (50000, {
: All => sub { $_ = $x; s/\s+//g },
: One => sub { $_ = $x; s/\s+?//g },
: tr=> sub { $_ = $x; tr/ \t\n\r\f//d},
:} );
:
:Benchmark: timing 50000 iterations of All, One, tr...
: All: 8 wallclock secs ( 7.11 usr + 0.00 sys = 7.11 CPU)
: One: 11 wallclock secs (10.67 usr + 0.00 sys = 10.67 CPU)
: tr: 3 wallclock secs ( 2.81 usr + 0.00 sys = 2.81 CPU)
Like so many others, this example benchmark, I regret, essentially
proves nothing. You have tried only one data set. Please examine the
following slightly more comprehensive benchmark results.
What observations can you make reading these results that you could
not make from the lone example of your above? The important thing
to pay attention to here is not the absolute numbers, but the
rate of change relative to each other and to itself.
--tom
#!/usr/bin/perl
# benchmark-deceptive
use Benchmark;
$mask = "%3d %2s %2s";
for $iter ( 5, 10, 20, 40, 80, 160 ) {
for $str ( q<xx>, q<xo>, q<oo> ) {
my $o = $str x $iter;
push @pairs, sprintf($mask, $iter, "tr", $str),
sub { ($n=$o) =~ y/x//d };
push @pairs, sprintf($mask, $iter, "s", $str),
sub { ($n=$o) =~ s/x//g };
}
}
print join("\n", @pairs, '');
timethese 100_000 => { @pairs };
__END__
Sample results:
5 s oo: 1 wallclock secs ( 0.53 usr + 0.00 sys = 0.53 CPU)
5 tr oo: 1 wallclock secs ( 0.60 usr + 0.00 sys = 0.60 CPU)
5 s xo: 2 wallclock secs ( 1.67 usr + 0.00 sys = 1.67 CPU)
5 tr xo: 1 wallclock secs ( 0.59 usr + 0.00 sys = 0.59 CPU)
5 s xx: 3 wallclock secs ( 2.24 usr + 0.00 sys = 2.24 CPU)
5 tr xx: 1 wallclock secs ( 0.60 usr + 0.00 sys = 0.60 CPU)
10 s oo: 0 wallclock secs ( 0.55 usr + 0.00 sys = 0.55 CPU)
10 tr oo: 1 wallclock secs ( 0.62 usr + 0.00 sys = 0.62 CPU)
10 s xo: 1 wallclock secs ( 2.49 usr + 0.00 sys = 2.49 CPU)
10 tr xo: 1 wallclock secs ( 0.62 usr + 0.00 sys = 0.62 CPU)
10 s xx: 4 wallclock secs ( 3.66 usr + 0.00 sys = 3.66 CPU)
10 tr xx: 1 wallclock secs ( 0.63 usr + 0.00 sys = 0.63 CPU)
20 s oo: 1 wallclock secs ( 0.56 usr + 0.00 sys = 0.56 CPU)
20 tr oo: -1 wallclock secs ( 0.67 usr + 0.00 sys = 0.67 CPU)
20 s xo: 5 wallclock secs ( 4.09 usr + 0.00 sys = 4.09 CPU)
20 tr xo: -1 wallclock secs ( 0.68 usr + 0.00 sys = 0.68 CPU)
20 s xx: 6 wallclock secs ( 6.46 usr + 0.00 sys = 6.46 CPU)
20 tr xx: -1 wallclock secs ( 0.69 usr + 0.00 sys = 0.69 CPU)
40 s oo: -1 wallclock secs ( 0.62 usr + 0.00 sys = 0.62 CPU)
40 tr oo: 0 wallclock secs ( 0.81 usr + 0.00 sys = 0.81 CPU)
40 s xo: 6 wallclock secs ( 7.25 usr + 0.00 sys = 7.25 CPU)
40 tr xo: 1 wallclock secs ( 0.83 usr + 0.00 sys = 0.83 CPU)
40 s xx: 12 wallclock secs (12.08 usr + 0.00 sys = 12.08 CPU)
40 tr xx: 1 wallclock secs ( 0.83 usr + 0.00 sys = 0.83 CPU)
80 s oo: 1 wallclock secs ( 0.74 usr + 0.00 sys = 0.74 CPU)
80 tr oo: 1 wallclock secs ( 1.10 usr + 0.00 sys = 1.10 CPU)
80 s xo: 14 wallclock secs (13.61 usr + 0.00 sys = 13.61 CPU)
80 tr xo: 1 wallclock secs ( 1.06 usr + 0.00 sys = 1.06 CPU)
80 s xx: 24 wallclock secs (23.28 usr + 0.00 sys = 23.28 CPU)
80 tr xx: 0 wallclock secs ( 1.08 usr + 0.00 sys = 1.08 CPU)
160 s oo: 1 wallclock secs ( 1.00 usr + 0.00 sys = 1.00 CPU)
160 tr oo: 2 wallclock secs ( 1.57 usr + 0.00 sys = 1.57 CPU)
160 s xo: 27 wallclock secs (26.33 usr + 0.00 sys = 26.33 CPU)
160 tr xo: 2 wallclock secs ( 1.58 usr + 0.00 sys = 1.58 CPU)
160 s xx: 46 wallclock secs (45.70 usr + 0.00 sys = 45.70 CPU)
160 tr xx: 2 wallclock secs ( 1.58 usr + 0.00 sys = 1.58 CPU)
--
Owning a paintbrush doesn't make you an artist.
-- Warren Tryk, in comp.graphics.apps.photoshop
------------------------------
Date: 9 Jul 1999 13:49:44 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Emulating C++ Class Templates
Message-Id: <7m4ulo$sp8$1@pegasus.csx.cam.ac.uk>
In article <7m303r$llq$1@nnrp1.deja.com>, <williajp@my-deja.com> wrote:
>I want to derive classes A2 and B2 from, respectively, A1 and B1, where
>A1 and B1 share a common parent class. The new code is identical in
>both derivations. That is, A2 and B2 override and add the same
>methods. I cannot modify any code in the A1 and B1 class hierarchies
>and do not want to write a bunch of forwarding functions since A1 and
>B1 are so large.
>
>So, I'd like to write a class C that would be equivalent to A2 when its
>parent is A1, but would be equivalent to B2 if its parent is B1. In
>C++, I'd make C a class template whose template parameter is its parent
>class. How can I get the same effect in Perl?
People are generally a bit uncomfortable with multiple inheritance.
But this looks like a good use for it.
Define your new methods in package C, then the definition for classes
A2 and B2 become
package A2;
@ISA = qw( C, A1 );
package B2;
@ISA = qw( C, B1 );
Mike Guy
------------------------------
Date: 9 Jul 1999 08:02:50 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Emulating C++ Class Templates
Message-Id: <3786010a@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, mjtg@cus.cam.ac.uk (M.J.T. Guy) writes:
: @ISA = qw( C, A1 );
^
^
^
Oops.
--tom
--
honorificabilitudinity Obs. rare - 0. [ad. med.L. honorificabilitudinitas
(Mussatus c 1300 in Du Cange), a grandiose extension of honorificabilitudo
honourableness
------------------------------
Date: 9 Jul 1999 08:40:56 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: ftp
Message-Id: <slrn7obuuh.h7.abigail@alexandra.delanet.com>
Ian Mortimer (ianmorty@nortelnetworks.com) wrote on MMCXXXVIII September
MCMXCIII in <URL:news:3785C004.6F360D15@nortelnetworks.com>:
``
`` Is it possible to run an ftp session using perl ?
Net::FTP;
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
-----------== 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: Fri, 09 Jul 1999 14:45:37 +0100
From: Ian Mortimer <ianmorty@nortelnetworks.com>
Subject: Re: ftp
Message-Id: <3785FD01.F7134FDC@nortelnetworks.com>
Thomas,
Do you think you could post these 'easy' solutions ?
I haven't had much experience with running shell stuff !
Ian.
Thomas Weholt wrote:
>
> Yo,
>
> I looked at the CPAN-module and also at some examples in the Perl
> CookBook. It seems as if simlpe things like just put or get is easy to
> implement, but I haven`t seen any examples doing more than that. I`d
> like to get the results of ls, pipe it to a file and process the
> contents.
>
> Any thoughts?
>
> Thomas.
------------------------------
Date: 9 Jul 1999 13:27:33 GMT
From: klassa@aur.alcatel.com (John Klassa)
Subject: Hacker fouls off All-Star site
Message-Id: <7m4tc5$oco$1@aurwww.aur.alcatel.com>
Our very own Chris Nandor?
[ Reposted without permission from ZDNet Tech News at
http://www.excite.com/computers_and_internet/tech_news/\
zdnet/?article=/news/19990709/2290058.inp ]
Hacker fouls off All-Star site
By Margaret Kane
07/08/99 02:09:00 PM
A Red Sox fan cast more than
25,000 votes at baseball's
All-Star site to push Boston
shortstop ahead of Yankee
rival.
One of the biggest rivalries in baseball just got digital.
A 25-year-old Boston Red Sox fan cast around 25,000 votes for shortstop
Nomar Garciaparra on Major League Baseball's All-Star game voting site.
The site allowed users to log on to vote for players. Starters for the
game are chosen by the fans, with ballots distributed at games and
through promotions. The League also allowed fans to go online and vote,
but was supposed to restrict the number of times they could cast a
ballot to 22, equal to the number of times ballots were distributed at
each Major League ballpark.
But when Sox fan Chris Nandor heard that Garciaparra was trailing New
York Yankees shortstop Derek Jeter by around 20,000 votes, he decided to
bump that limit up a bit, the Boston Globe reported.
He cast 25,259 votes for Garciaparra and other Red Sox players on the
last day of online voting, said officials for SportsLine USA Inc.
(Nasdaq:SPLN), which developed the League's All-Star site. The hacker
used a Perl script to repeatedly submit the entries to the Web site.
SportsLine said that their system administrators detected the hack and
were able to cancel the votes.
One of many "There were other programs and spoofs," said Dan
Leichtenschlag, senior vice president of operations for Sportsline.
"For the most part people were informed when they exceeded the 22 vote
limit, but once we realized people were trying to game us, we would
return the votes and let them think they tricked us," he said.
The Garciaparra hack was fairly easy to detect. The hacker never changed
the phone number or e-mail address that he used to cast votes from,
Leichtenschlag said.
--
John Klassa / Alcatel USA / Raleigh, NC, USA
------------------------------
Date: 9 Jul 1999 08:42:38 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Help!: trying to compile my scripts
Message-Id: <slrn7obv1n.h7.abigail@alexandra.delanet.com>
Don Smith (smithda@webwide.net) wrote on MMCXXXVIII September MCMXCIII in
<URL:news:7m45sa$5fd$1@news.unicomp.net>:
||
|| I am trying to find a method of hiding my sources from the public.
Easy. Put the sources on a machine. Unplug all the network cables.
Put the machine in a closet. Lock the closet. Throw away the key.
Then read the FAQ.
Abigail
--
perl -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
print chr 0x$& and q
qq}*excess********}'
-----------== 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: 9 Jul 1999 14:49:14 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: perlscript in IE
Message-Id: <3785fdda@newsread3.dircon.co.uk>
Frank de Bot <debot@xs4all.nl> wrote:
>> > Jonathan Stowe wrote:
>> >
>> >> On Tue, 06 Jul 1999 10:38:00 -0800 Ashish Kadakia wrote:
>> >> > Hi,
>> >> > Anyone knows how I can view cleint side Perlscript in IE.
^^^^^^^^^^^
>> >> > I downloaded some example, but cannot view in the browser.
>> >> > It doesn't display anything.. Do I need sometype of dlls?
>> >> >
>> >>
>> >> You need to download and install Activeperl <http://www.activestate.com>
>> >> and answer yes if it asks you about it ...
>> >>
>> >
>> > Download a http server. http://www.apache.org/
>> > You will be able to execute scripts in your browser. Further instructions include
>> > at the website.
>> >
>>
>> That doesnt answer his question and is off-topic anyhow.
>>
> If you want to run a perlscript in a browser, this is THE answer. Without any http
> server it just won't work for now!
>
But running it on a server is different to running it in a browser.
I have underlined the bit of the original post that would indicate that
this is not what the original poster was interested in.
And please sort out your quoting I am bored with having to rearrange
everything and remove all of the signatures.
/J\
--
"If I was going to wear a wig I'd choose something a lot better than this"
- Barry Norman
------------------------------
Date: 9 Jul 1999 07:54:36 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: perlscript in IE
Message-Id: <3785ff1c@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, Frank de Bot <debot@xs4all.nl> writes:
:If you want to run a perlscript in a browser, this is THE answer. Without
:any http server it just won't work for now!
Why oh why oh why did you quote all 27 lines of that posting, including
the offensively long signature? And what is this 23-line signature
of yours? That's way over the top. You just hit us with fifty lines of
noise for two lines of content. This just isn't the way things are done.
Either you need to learn about expected standards on Usenet, or theres'
a bug in your newsreader, or both.
--tom
--
"And if someone breaks into my computer again? Oh, I doubt I'll bother.
The first time it's research. The second time is just engineering."
Clifford Stoll in Byte
------------------------------
Date: Fri, 09 Jul 1999 13:13:03 GMT
From: hamed53@my-deja.com
Subject: please help regex!
Message-Id: <7m4sgm$9u7$1@nnrp1.deja.com>
hi
i was wondering if any of you could help me with this:
i have a string i want to reverse the words containing olny these chars
(more than or equal 128, less than 176 or, more than or equal 224, less
than 255) :)
(ord($mychar) >= 128 && ord($mychar) < 176) or (ord($mychar) >= 224 &&
ord($mychar) < 255)
for example i have this string:
my $string = "hello this is test for £¦©¢ and ©¤£¢’‘~";
the output would be:
hello this is test for ¢©¦£ and ~‘’¢£¤©
actually those words are farsi words in diffrent language!
so i want to only reverse the farsi words! not english ones!
any help would be appreciated
thanks
hamed
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 09 Jul 1999 13:27:06 GMT
From: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: Polling sockets
Message-Id: <3785f845.172981916@news.dtu.dk>
On 7 Jul 1999 19:26:59 -0000, anno4000@lublin.zrz.tu-berlin.de (Anno
Siegel) wrote:
>R.Joseph <streaking_pyro@my-deja.com> wrote in comp.lang.perl.misc:
>>I am trying to write a socket-based server using IO::Select and
>>IO::Socket. It was suggested by someone who is more advanced than me
>>and has done what I am doing to poll the sockets to allow multiple
>>connections. This I don't fully understand; what does he mean when he
>>says this? Any help is great! Thanks!
>
>Look, what select does for you is described in perldoc -f select.
>In short, you give it a number of file descriptors to watch. It
>gives you back which file descriptor is ready for input or for
>output. The way you react to this information depends entirely
>on what your server is supposed to do, so there will be not much
>help from here (there can't).
I agree that the description of select in perlfunc is a good
description of what seleact is and what is does. Never use it! Use
IO::Select indstead. It is much easier. There even is a good example
at exactly what you're trying to do at the end of the documentation
for IO::Select.
Lars
------------------------------
Lars Gregersen (lg@kt.dtu.dk)
http://www.gbar.dtu.dk/~matlg
------------------------------
Date: Fri, 09 Jul 1999 13:04:06 GMT
From: mike cardeiro <mikecard@my-deja.com>
Subject: Re: Program for Easy Writing of Perl Code
Message-Id: <7m4rvv$9nt$1@nnrp1.deja.com>
In article <3785e4bc@cs.colorado.edu>,
tchrist@mox.perl.com (Tom Christiansen) wrote:
>
> f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.
>
...why?
mike cardeiro
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 9 Jul 1999 08:22:25 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Program for Easy Writing of Perl Code
Message-Id: <slrn7obtrr.h7.abigail@alexandra.delanet.com>
Francisco Romero (fromero@csudh.edu) wrote on MMCXXXVIII September
MCMXCIII in <URL:news:37859486.8CA70542@csudh.edu>:
-- Does anyone know if there is an application that will help you write
-- perl code with ease!
vi
-- I use inux.
I've never heard of that.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== 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: 9 Jul 1999 14:54:24 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Program for Easy Writing of Perl Code
Message-Id: <3785ff10@newsread3.dircon.co.uk>
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> Francisco Romero <fromero@csudh.edu> wrote:
>> Does anyone know if there is an application that will help you write
>> perl code with ease!
>>
>
> You mean like:
>
<snip>
> print <<EOSCRIPT;
Make that:
print PROG <<EOSCRIPT;
/J\
--
"The chef's salty balls have dropped" - Christopher Price, BBC NEWS 24
------------------------------
Date: Fri, 09 Jul 1999 09:35:16 -0400
From: Chad La Joie <cllajoie@mtu.edu>
Subject: Re: Question: Good Project?
Message-Id: <3785FA94.60771EED@mtu.edu>
I did. I used a subroutine called InsideHumor.
David Cassell wrote:
> Chad La Joie wrote:
> >
> > That idea is so stupid.
> > --CK
> >
> > Jason Stapels wrote:
> >
> > > Write Windows2001
>
> Helpful hint #763.2:
>
> Before posting to comp.lang.perl.misc, be sure to do this:
>
> use Lingua::Humor;
>
> HTH,
> David
> --
> David Cassell, OAO cassell@mail.cor.epa.gov
> Senior computing specialist
> mathematical statistician
------------------------------
Date: 9 Jul 1999 14:51:02 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Question: Good Project?
Message-Id: <3785fe46@newsread3.dircon.co.uk>
Chad La Joie <cllajoie@mtu.edu> wrote:
> That idea is so stupid.
> --CK
>
> Jason Stapels wrote:
>
>> Write Windows2001
>
Yeah everyone knows the world is going to end next week so why bother.
/J\
--
"I must call a man in - I want to get felt laid down in the loft" -
Graham Norton
------------------------------
Date: 9 Jul 1999 13:55:37 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Self-referencing hash? Ick?
Message-Id: <7m4v0p$su4$1@pegasus.csx.cam.ac.uk>
In article <931464587.19958@www.remarq.com>, lglenn <larry@ldis.com> wrote:
>In a script I'm writing, I'd kind of like to do something
>like this:
>
>my %map;
>%map = ( foo => \%map, bar => 'hi' );
>
>...which does work (i.e. $map{foo}->{bar} evaluates to 'hi'
>- on my machine, anyway).
>
>My question is, is this undefined behavior, or is it OK?
Yes, it's OK, but you may suffer from memory leaks.
See the warning under "Two-Phased Garbage Collection" in perlobj.
Mike Guy
------------------------------
Date: Fri, 09 Jul 1999 13:22:06 GMT
From: mike cardeiro <mikecard@my-deja.com>
Subject: Re: toturial
Message-Id: <7m4t1i$a4n$1@nnrp1.deja.com>
In article <3785179F.BFF90465@bellsouth.net>,
> Don Estes <djestes@bellsouth.net> wrote:
> Is there a web site that has every perl element
http://language.perl.com/newdocs/pod/
mike cardeiro
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 9 Jul 1999 08:23:50 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Using perlcc to compile a perl prog
Message-Id: <slrn7obtud.h7.abigail@alexandra.delanet.com>
richardwchin@my-deja.com (richardwchin@my-deja.com) wrote on MMCXXXVIII
September MCMXCIII in <URL:news:7m4iho$6qp$1@nnrp1.deja.com>:
()
() could I ask you if you've had any problems using perlcc, I understand
() it's still at beta stage. I want to create a single executable rather
() than a script that some users might be tempted to edit.
You don't want people fixing your bugs?
Abigail
--
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))
-----------== 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: 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 89
************************************