[25120] in Perl-Users-Digest
Perl-Users Digest, Issue: 7370 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 6 18:15:35 2004
Date: Sat, 6 Nov 2004 15:15:13 -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 Sat, 6 Nov 2004 Volume: 10 Number: 7370
Today's topics:
Re: Check POP3 E-mail <1usa@llenroc.ude.invalid>
Re: Check POP3 E-mail <noreply@gunnar.cc>
Re: Check POP3 E-mail <1usa@llenroc.ude.invalid>
Re: Check POP3 E-mail <noreply@gunnar.cc>
Converting multiple spaces for 3 col text? (JCunington)
Re: Converting multiple spaces for 3 col text? <see@sig.invalid>
Re: Converting multiple spaces for 3 col text? <tadmc@augustmail.com>
FAQ 4.60: How can I always keep my hash sorted? <comdog@panix.com>
FAQ 4.7: How do I multiply matrices? <comdog@panix.com>
Gethostbyaddr INET <nospam.hciss@yahoo.com>
Re: Gethostbyaddr INET <1usa@llenroc.ude.invalid>
Re: Gethostbyaddr INET <matthew.garrish@sympatico.ca>
Re: Gethostbyaddr INET <1usa@llenroc.ude.invalid>
How long to complete: while ($i<1e10){i++;} (Jose Gomez)
Re: How long to complete: while ($i<1e10){i++;} <rwxr-xr-x@gmx.de>
Re: matching all perldoc names but no more <1usa@llenroc.ude.invalid>
Re: matching all perldoc names but no more <ioneabu@yahoo.com>
Re: Newbie Question <1usa@llenroc.ude.invalid>
OT (Re: casting question) <1usa@llenroc.ude.invalid>
Re: OT (Re: casting question) <nospam@nospam.com>
Re: Q: re Inline and Benchmark <kalinaubears@iinet.net.au>
Re: sanity checking proxy URL before passing to LWP (buildmorelines)
Re: Win32 Advanced Properties <dontwannasay@home.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 6 Nov 2004 16:35:33 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Check POP3 E-mail
Message-Id: <Xns959975ED164AEasu1cornelledu@132.236.56.8>
krakle@visto.com (krakle) wrote in
news:237aaff8.0411060746.379320e@posting.google.com:
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
> news:<Xns9598802954588asu1cornelledu@132.236.56.8>...
>> krakle@visto.com (krakle) wrote in
>> news:237aaff8.0411050643.56e045a0@posting.google.com:
>>
>> > arguement. mod_perl scripts stay in memory. Unless you reset the
>> > values of a variable at the beginning of the script or before that
>> > variable is used it may contain the previous users data...
>>
>> Your statement is full of half truths. If you don't write 'good'
>> programs, then bad things surely mya happen. However, I have quite a
>> few CGI scripts that are being run under mod_perl, and I have yet to
>> run into such an issue.
>>
>> Sinan.
>
> Then you don't use mod_perl much. See my example.
Your example is bad code.
It is true that you will have problems if you do:
my $q = CGI->new;
sub mysub {
my $value = $q->param('some_param');
...
}
you will have problem, but you should not be doing that kind of thing
anyway whether your script is running under mod_perl or not.
Sinan.
------------------------------
Date: Sat, 06 Nov 2004 17:46:56 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Check POP3 E-mail
Message-Id: <2v4dgrF2h90deU1@uni-berlin.de>
krakle wrote:
> Gunnar Hjalmarsson wrote:
>> krakle wrote:
>>> If ran as a CGI everything works fine... HOWEVER, if ran as
>>> mod_perl @message retains the previous users data then the new
>>> users data adds to the array then the next users data will retain
>>> the last 2 users and so on... So Even if the current users
>>> session never had any "messages" to add @message will not be
>>> empty. BUT if you used
>>>
>>> my @message = ();
>>>
>>> just like the original poster used the array woudl be reset at
>>> the start of the script emptying any data left over from the
>>> previous session.
>>
>> As I explained in another message in this thread, your theory is
>> incorrect, and if you had written real code and run it, you'd have
>> found out for yourself.
>
> It ISN'T incorrect at all. Have you even used mod_perl???
Yes. But I have to admit that it has only been CGI scripts run under
Apache::Registry and similar.
The point I was trying to make is that package variables and lexically
scoped variables behave differently in this respect. However, see
Brian's message in this thread. Even if I haven't seen file scoped
lexicals retain their values, I trust that Brian knows what he is
talking about.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 6 Nov 2004 19:37:42 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Check POP3 E-mail
Message-Id: <Xns959994CFBDDD8asu1cornelledu@132.236.56.8>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in news:2v4dgrF2h90deU1@uni-
berlin.de:
> The point I was trying to make is that package variables and lexically
> scoped variables behave differently in this respect. However, see
> Brian's message in this thread. Even if I haven't seen file scoped
> lexicals retain their values, I trust that Brian knows what he is
> talking about.
Gunnar,
You were correct. What krakle is krakling about is summarized here:
http://perl.apache.org/docs/1.0/guide/porting.html#Exposing_Apache__Regis
try_secrets
He does not understand it but I am sure you will :)
Sinan.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: Sat, 06 Nov 2004 23:54:20 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Check POP3 E-mail
Message-Id: <2v532rF2hr9bnU1@uni-berlin.de>
A. Sinan Unur wrote:
> Gunnar Hjalmarsson wrote:
>> The point I was trying to make is that package variables and
>> lexically scoped variables behave differently in this respect.
>> However, see Brian's message in this thread. Even if I haven't seen
>> file scoped lexicals retain their values, I trust that Brian knows
>> what he is talking about.
>
> Gunnar,
>
> You were correct. What krakle is krakling about is summarized here:
>
> http://perl.apache.org/docs/1.0/guide/porting.html#Exposing_Apache__Registry_secrets
To me, that rather confirms that brian was correct. The handler
subroutine, seemingly top level subroutines behaving as nested ditto, etc...
I for one learned from this exchange of messages that *really* file
scoped lexicals, i.e. top level lexicals in programs that are run under
variants of mod_perl that do not make use of any "handler subroutine",
retain their values. I did not know that before.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 06 Nov 2004 20:33:00 GMT
From: jcunington@aol.comjkelm (JCunington)
Subject: Converting multiple spaces for 3 col text?
Message-Id: <20041106153300.07938.00000263@mb-m07.aol.com>
I'm looking for a substitution phrase to convert only multiple spaces to an
HTML <TD></TD> tag. I'm scanning magazines in my model railroad collection to
convert them to web pages and want to keep the text as close to its original
format as possible. My 2 books are a little sketchy on substitution strings.
Jay
Jay
All the world's a stage - and everybody's a critic.
All messages from domain hotmail.com have been blocked.
------------------------------
Date: Sat, 06 Nov 2004 17:26:34 -0500
From: Bob Walton <see@sig.invalid>
Subject: Re: Converting multiple spaces for 3 col text?
Message-Id: <418d4d52$1_1@127.0.0.1>
JCunington wrote:
> I'm looking for a substitution phrase to convert only multiple spaces to an
> HTML <TD></TD> tag. I'm scanning magazines in my model railroad collection to
> convert them to web pages and want to keep the text as close to its original
> format as possible. My 2 books are a little sketchy on substitution strings.
Well, try:
$string=~s!\s{2,}!<TD></TD>!g;
If that isn't what you want, more clearly articulate what it is you do want.
> Jay
...
--
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl
------------------------------
Date: Sat, 6 Nov 2004 16:37:30 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Converting multiple spaces for 3 col text?
Message-Id: <slrncoqkha.kf3.tadmc@magna.augustmail.com>
JCunington <jcunington@aol.comjkelm> wrote:
> I'm looking for a substitution phrase to convert only multiple spaces to an
> HTML <TD></TD> tag.
s# +#<TD></TD>#g; # two or more spaces, uses an alternate delimiter
> My 2 books are a little sketchy on substitution strings.
Books are nice but are not required.
The docs that *come with* the perl distribution are the very
first place to look for stuff.
For regular expressions, that would be:
perldoc perlrequick
perldoc perlretut
perldoc perlre
And for the s/// operator that makes use of regular expressions:
perldoc perlop
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 6 Nov 2004 17:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 4.60: How can I always keep my hash sorted?
Message-Id: <cmj045$93a$1@reader1.panix.com>
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 Perl.
--------------------------------------------------------------------
4.60: How can I always keep my hash sorted?
You can look into using the DB_File module and tie() using the $DB_BTREE
hash bindings as documented in "In Memory Databases" in DB_File. The
Tie::IxHash module from CPAN might also be instructive.
--------------------------------------------------------------------
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 or to the maintainers as
directed in the perlfaq manual page.
Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release. It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.
The perlfaq manual page contains the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-2002 Tom Christiansen and Nathan
Torkington, and other contributors as noted. All rights
reserved.
This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.
------------------------------
Date: Sat, 6 Nov 2004 23:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 4.7: How do I multiply matrices?
Message-Id: <cmjl75$f14$1@reader1.panix.com>
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 Perl.
--------------------------------------------------------------------
4.7: How do I multiply matrices?
Use the Math::Matrix or Math::MatrixReal modules (available from CPAN)
or the PDL extension (also available from CPAN).
--------------------------------------------------------------------
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 or to the maintainers as
directed in the perlfaq manual page.
Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release. It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.
The perlfaq manual page contains the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-2002 Tom Christiansen and Nathan
Torkington, and other contributors as noted. All rights
reserved.
This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.
------------------------------
Date: Sat, 6 Nov 2004 14:54:26 -0600
From: "Matt" <nospam.hciss@yahoo.com>
Subject: Gethostbyaddr INET
Message-Id: <10oqej32mh0gk72@corp.supernews.com>
In the below example gethostbyaddr returns the reverse DNS of the IP that
sent the UDP packet. How do I get just the IP address without reverse DNS?
Matt
http://iis1.cps.unizar.es/Oreilly/perl/cookbook/ch17_06.htm
#!/usr/bin/perl -w
# udpqotd - UDP message server
use strict;
use IO::Socket;
my($sock, $oldmsg, $newmsg, $hisaddr, $hishost, $MAXLEN, $PORTNO);
$MAXLEN = 1024;
$PORTNO = 5151;
$sock = IO::Socket::INET->new(LocalPort => $PORTNO, Proto => 'udp')
or die "socket: $@";
print "Awaiting UDP messages on port $PORTNO\n";
$oldmsg = "This is the starting message.";
while ($sock->recv($newmsg, $MAXLEN)) {
my($port, $ipaddr) = sockaddr_in($sock->peername);
$hishost = gethostbyaddr($ipaddr, AF_INET);
print "Client $hishost said ``$newmsg''\n";
$sock->send($oldmsg);
$oldmsg = "[$hishost] $newmsg";
}
die "recv: $!";
------------------------------
Date: 6 Nov 2004 21:07:36 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Gethostbyaddr INET
Message-Id: <Xns9599A40DC7BC8asu1cornelledu@132.236.56.8>
"Matt" <nospam.hciss@yahoo.com> wrote in
news:10oqej32mh0gk72@corp.supernews.com:
> In the below example gethostbyaddr returns the reverse DNS of the IP
> that sent the UDP packet. How do I get just the IP address without
> reverse DNS?
Matt:
Rule number one: Don't steal.
> http://iis1.cps.unizar.es/Oreilly/perl/cookbook/ch17_06.htm
See rule number one.
Rule number two: We are not going to read the code you post if you refuse
to read the code you yourself posted.
> my($port, $ipaddr) = sockaddr_in($sock->peername);
> $hishost = gethostbyaddr($ipaddr, AF_INET);
See rule number two.
Don't steal. As far as I know it is a sin and/or a crime pretty much
anywhere in the world.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: Sat, 6 Nov 2004 17:12:48 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Gethostbyaddr INET
Message-Id: <x%bjd.29132$dj2.2048863@news20.bellglobal.com>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
news:Xns9599A40DC7BC8asu1cornelledu@132.236.56.8...
> "Matt" <nospam.hciss@yahoo.com> wrote in
> news:10oqej32mh0gk72@corp.supernews.com:
>
>> In the below example gethostbyaddr returns the reverse DNS of the IP
>> that sent the UDP packet. How do I get just the IP address without
>> reverse DNS?
>
> Matt:
>
> Rule number one: Don't steal.
>
>> http://iis1.cps.unizar.es/Oreilly/perl/cookbook/ch17_06.htm
>
> See rule number one.
>
That same link was posted to alt.perl a week ago. I've sent an email to the
people at O'Reilly to make them aware (there's an email address on the
"Contact Us" page you can use to report these kinds of links).
Matt
------------------------------
Date: 6 Nov 2004 22:29:37 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Gethostbyaddr INET
Message-Id: <Xns9599B1F5A5573asu1cornelledu@132.236.56.8>
"Matt Garrish" <matthew.garrish@sympatico.ca> wrote in
news:x%bjd.29132$dj2.2048863@news20.bellglobal.com:
>
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
> news:Xns9599A40DC7BC8asu1cornelledu@132.236.56.8...
>> Rule number one: Don't steal.
>>
>>> http://iis1.cps.unizar.es/Oreilly/perl/cookbook/ch17_06.htm
> That same link was posted to alt.perl a week ago. I've sent an email
> to the people at O'Reilly to make them aware (there's an email address
> on the "Contact Us" page you can use to report these kinds of links).
Well, I reported it again then :)
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: 6 Nov 2004 08:16:00 -0800
From: d25252@hotmail.com (Jose Gomez)
Subject: How long to complete: while ($i<1e10){i++;}
Message-Id: <a6376f1f.0411060816.c095193@posting.google.com>
Poking around with the Google Labs Aptitude Test question #17, i.e.
"Consider a function which, for a given whole number n, returns
the number of ones required when writing out all numbers between
0 and n.
For example, f(13) = 6
Notice that f(1)=1. What is the next largest n such that
f(n)=n?",
I wondered if there exists a number that satisfies the same function
for all digits 1 thru 9; that is, a number N such that writing all the
numbers between 0 and N requires N ones, N twos, N threes, etc.
The script ran for days! At the last interuption, the largest
interesting number found was 500,000,000: it satisfies the function
for 1,2,3 and 4.
Anyway, in checking what was taking so long I found that on a Dell
Dimension 4400 (1.60 Ghz Intel Pentium 4 with 256MB RAM) the following
script runs for about an hour:
#----------
use strict;
use warnings;
my $n=0;
while( $n < 1e10 ) {
$n++ ;
}
#----------
So to run this while loop up through a limit of $n<1e16 would require
a susprising 114 years.
perl -v
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Binary build 635 provided by ActiveState Corp.
Built 15:34:21 Feb 4 2003
On a HC PV m470n Dell (3.00 Ghz Intel Pentium 4 with 512MB RAM) and
perl -v
This is perl, v5.8.4 built for MSWin32-x86-multi-thread
(with 3 registered patches, see perl -V for more detail)
Binary build 810 provided by ActiveState Corp.
Built Jun 1 2004 11:52:21
the perl script ran in about 30 minutes - still over 70 years to
iterate through 1e16!
Now, on the same Dell, the binary compiled with Mingw GCC 3.2.3 from
void main()
{
long int i;
i=1;
while ( i > 0) {
i++ ;
}
}
completes in less than one minute. The max long int is 2,147,483,647
so this is roughly comparable to a limit of 1e9 in the perl script.
Using type double in C to get the same 1e10 limit
void main()
{
double limit, i;
i=1.0;
while ( i < 1.0e+10 ) {
i=i+1.0 ;
}
}
runs in under 2 minutes, and can iterate to through 1.0e+11 in about
25 minutes - projecting about 34 years to go through 1e16.
Thoughts anyone?
------------------------------
Date: 6 Nov 2004 19:20:03 GMT
From: Lukas Mai <rwxr-xr-x@gmx.de>
Subject: Re: How long to complete: while ($i<1e10){i++;}
Message-Id: <cmj853$m3u$1@wsc10.lrz-muenchen.de>
Jose Gomez schrob:
[...]
> void main()
[...]
> void main()
> {
[...]
> Thoughts anyone?
Yes. void main is wrong. See
http://www.eskimo.com/~scs/C-faq/q11.12.html
Lukas
--
BEGIN{$^H {q}=sub{print$_[1]};$^H |=0x28000}"Just another Perl hacker,\n"
------------------------------
Date: 6 Nov 2004 16:31:38 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: matching all perldoc names but no more
Message-Id: <Xns9599754346DDAasu1cornelledu@132.236.56.8>
wana <ioneabu@yahoo.com> wrote in
news:10ophnae0cv9j5d@news.supernews.com:
> I was getting carried away answering myself in another thread so I
> thought I should purify my actual problem:
>
> I am allowing a user to enter a perldoc name and I will run 'perldoc
> $name' for them.
I thinking you are going down the wrong road. You know exactly the list of
phrases you want to allow. Why don't you just restrict the options to that.
Even if you do not have Perl on your computer, it is not hard to write
script to parse the output of perldoc perltoc. That will give you the list
of allowable phrases. Now, you can make sure the phrase sent to your CGI
matches only one of those in the set of allowable perldoc arguments.
Sinan
------------------------------
Date: Sat, 06 Nov 2004 14:41:57 -0500
From: wana <ioneabu@yahoo.com>
Subject: Re: matching all perldoc names but no more
Message-Id: <10oq6todvqrl2e8@news.supernews.com>
Tad McClellan wrote:
> wana <ioneabu@yahoo.com> wrote:
>
>> I am allowing a user to enter a perldoc name and I will run 'perldoc
>> $name' for them.
>>
>> What regex will match all perldoc names but not allow for a command to be
>> slipped into the name.
>
>
> You won't need to solve that problem if you choose an approach
> that does not require solving that problem. :-)
>
> If they can only look up the std docs, then build a lookup table
> of the actual installed std docs, see code below.
>
> Or maybe process the =head2 POD tags in perltoc.pod for legal names.
>
> I think this ought to work though: /^(\w|::)+$/
I only avoided \w because perlre states that it is not portable across
character sets and may be insecure, which is critical in my case. That may
or may not be an issue in my program.
wana
>
> (leaving out single quote on purpose since it is deprecated.)
>
>
> ---------------------------------
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> foreach my $pod ( 'foo bar', qw/ perlnope perl perltoc perlfunc / ) {
> if ( is_pod($pod) )
> { print "$pod is a POD\n" }
> else
> { print "$pod is *not* a POD\n" }
> }
>
>
> BEGIN {
> my %pods;
>
> chomp( my $dir = qx/ perldoc -l perlfunc / );
> $dir =~ s#/[^/]+$##; # should use File::Basename here...
>
> opendir POD, $dir or die "could not open '$dir' directory $!";
> $pods{ $_ } = 1 for map { s/.pod$// ? $_ : () } readdir POD;
> closedir POD;
>
> sub is_pod { exists $pods{ $_[0] } ? 1 : 0 }
> }
> ---------------------------------
>
>
------------------------------
Date: 6 Nov 2004 19:24:38 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Newbie Question
Message-Id: <Xns95999298E5F1Aasu1cornelledu@132.236.56.8>
serhant@doruk.net.tr (Ali Ataman) wrote in
news:5831e321.0411060510.294df450@posting.google.com:
> I have a perl script and I would like to write the output of this perl
> script to a file. How can I do this.
>
> I know it is simple but I just started perl..
If everyone else does not mind I am going to take this opportunity to
make my usual recommendation in Turkish ... I promise, I won't make it a
habit :)
Merhaba Ali bey:
Bu grubun yazarken 'uymanizda fayda olan' kurallar (hatta 'raconu' bile
denebilir)
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
dokumaninda ozetlenmis durumda. Daha sonra ortaya cikabilecek yanlis
anlamalari azaltmak ve sorulariniza cevap almayi garantilemek icin
mutlaka okumanizi tavsiye ederim.
Sinan.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: 6 Nov 2004 21:45:35 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: OT (Re: casting question)
Message-Id: <Xns9599AA7E62326asu1cornelledu@132.236.56.8>
"daniel kaplan" <nospam@nospam.com> wrote in
news:1099774800.444616@nntp.acecape.com:
> if i were to judge you by just your posts, which is all you have of
> me and laid judgement thereaftrer, i would judge you to be one
> anti-social, miserable human being, who needs go out and get a girl
> (or a guy if you refer...i don't judge there either....actually your
> hostility towards me might tend me to say it's the latter )....but
> i'll refrain from such judgements till we get to know each other
Daniel:
I do not think you understand the implications of what you are saying
sometimes. You like to directly go to personal insults. This behavior
will not make me any more charitable towards you. As the saying goes,
once is happenstance, twice coincidence, thrice is enemy action. You have
gone way beyond three.
Sinan.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: Sat, 6 Nov 2004 17:18:02 -0500
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: OT (Re: casting question)
Message-Id: <1099779543.192767@nntp.acecape.com>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
news:Xns9599AA7E62326asu1cornelledu@132.236.56.8...
>You like to directly go to personal insults. This behavior
> will not make me any more charitable towards you. As the saying goes,
> once is happenstance, twice coincidence, thrice is enemy action. You have
> gone way beyond three.
i'm sorry sinan, what was this then that you wrote?
>>You could not have been much of a C programmer not knowing the
>>difference between casting and dereferencing.
go look in the mirror...and tell me who threw out personal insults
daniel
------------------------------
Date: Sat, 06 Nov 2004 17:27:23 +0000
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: Q: re Inline and Benchmark
Message-Id: <418d0acb$0$6567$5a62ac22@per-qv1-newsreader-01.iinet.net.au>
Sisyphus wrote:
> for (i = 0; i < len; i ++) {
> SvPVX(outsv)[i++] = rand() % 256;
> }
Try maybe:
for (i = 0; i < len; i ++) {
SvPVX(outsv)[i] = rand() % 256;
}
It dawned on me a few hours ago. My face is still glowing bright red :-)
No wonder it was twice as fast.
Thanks Tassilo - sorry for the noise.
Cheers,
Rob
--
To reply by email u have to take out the u in kalinaubears.
------------------------------
Date: 6 Nov 2004 09:02:22 -0800
From: bulk88@hotmail.com (buildmorelines)
Subject: Re: sanity checking proxy URL before passing to LWP
Message-Id: <ee659c69.0411060902.3f21614e@posting.google.com>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message news:<Xns9598DB3B5F3C3asu1cornelledu@132.236.56.8>...
> bulk88@hotmail.com (buildmorelines) wrote in
> news:ee659c69.0411051828.269a891d@posting.google.com:
>
> > What is the best/normal/typical way of validating or sanity checking a
> > URL that a user gave that will become the proxy address that will get
> > passed to LWP, I would prefer modules if possible?
>
> Search CPAN for Regexp::Common.
>
> > Would all of I want to do work by making a regular expression such as
> > m/http(|s):\/\/.+/i (invented myself)?
>
> I am not sure what you mean?
>
> Sinan.
Should I simple make my own regexp to make sure the URL supplied is a
valid proxy address by simple checking for "http://" or
/^http:\/\/.+/?
------------------------------
Date: Sat, 06 Nov 2004 19:28:17 GMT
From: Mike <dontwannasay@home.com>
Subject: Re: Win32 Advanced Properties
Message-Id: <Xns959974B0C8E63dontwannasaycom@204.127.204.17>
ChrisO <ceo@nospam.on.net> wrote in
news:2Lzid.26587$Qv5.19946@newssvr33.news.prodigy.com:
My thanks to all who have responded. I now see that it is a more involved
task than a (relatively?) simple Perl script. In the interest of speed, I
have started looking at commercially available alternatives.
Thanks Again,
Mike
------------------------------
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 7370
***************************************