[25107] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7357 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 4 06:05:55 2004

Date: Thu, 4 Nov 2004 03:05:06 -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           Thu, 4 Nov 2004     Volume: 10 Number: 7357

Today's topics:
    Re: Check POP3 E-mail <someone@example.com>
    Re: Check POP3 E-mail <tassilo.von.parseval@rwth-aachen.de>
    Re: Code review request: a better radix sort <someone@example.com>
        FAQ 2.1: What machines support Perl?  Where do I get it <comdog@panix.com>
        FAQ 2.8: Where can I get information on Perl? <comdog@panix.com>
    Re: Looking for C++ macro processing solution <see@sig.invalid>
    Re: Performance: longest prefix length <a@ry.ca>
    Re: Perl CGI project ideas (krakle)
    Re: Perl CGI project ideas (Si Ballenger)
    Re: Q: re Inline and Benchmark <tassilo.von.parseval@rwth-aachen.de>
    Re: Q: re Inline and Benchmark <kalinaubears@iinet.net.au>
    Re: Q: re Inline and Benchmark <bik.mido@tiscalinet.it>
    Re: Q: re Inline and Benchmark (Anno Siegel)
    Re: Q: re Inline and Benchmark <kalinaubears@iinet.net.au>
    Re: Q: re Inline and Benchmark <kalinaubears@iinet.net.au>
    Re: Rlogin client? <jll@soundobjectlogic.com>
    Re: Rlogin client? <abigail@abigail.nl>
    Re: The most perfect beginning <matthew.garrish@sympatico.ca>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 04 Nov 2004 08:50:50 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Check POP3 E-mail
Message-Id: <K3mid.91697$9b.85663@edtnps84>

David Gale wrote:
> Quoth A. Sinan Unur <1usa@llenroc.ude.invalid>:
> 
>>wana <ioneabu@yahoo.com> wrote:
>>
>>>my @message = ();
>>
>>There is no need to explictly initialize my variables.
> 
> Nor does it hurt to do so, and is a good habit to get into, in case you're
> ever in an environment when you can't choose which language to program in,
> and have to use something (say, C) which does not implicitly initialize
> variables.

According to the C FAQ:

Variables with static duration (that is, those declared outside of functions, 
and those declared with the storage class static), are guaranteed initialized 
(just once, at program startup) to zero, as if the programmer had typed ``= 
0''. Therefore, such variables are initialized to the null pointer (of the 
correct type; see also section 5) if they are pointers, and to 0.0 if they are 
floating-point.


John
-- 
use Perl;
program
fulfillment


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

Date: Thu, 4 Nov 2004 09:56:46 +0100
From: "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de>
Subject: Re: Check POP3 E-mail
Message-Id: <slrncojrme.g8u.tassilo.von.parseval@localhost.localdomain>

Also sprach John W. Krahn:

> David Gale wrote:
>> Quoth A. Sinan Unur <1usa@llenroc.ude.invalid>:
>> 
>>>wana <ioneabu@yahoo.com> wrote:
>>>
>>>>my @message = ();
>>>
>>>There is no need to explictly initialize my variables.
>> 
>> Nor does it hurt to do so, and is a good habit to get into, in case you're
>> ever in an environment when you can't choose which language to program in,
>> and have to use something (say, C) which does not implicitly initialize
>> variables.
>
> According to the C FAQ:
>
> Variables with static duration (that is, those declared outside of functions, 
> and those declared with the storage class static), are guaranteed initialized 
> (just once, at program startup) to zero, as if the programmer had typed ``= 
> 0''. Therefore, such variables are initialized to the null pointer (of the 
> correct type; see also section 5) if they are pointers, and to 0.0 if they are 
> floating-point.

But then, static variables are roughly the equivalent to Perl's package
variables. They are used of course but not a fraction as frequently as
automatic variables that may be declared at the beginning of a block
(with new Ansi99 even anywhere, I think). And those are never
initialized to anything sensible.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Thu, 04 Nov 2004 07:37:05 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Code review request: a better radix sort
Message-Id: <B_kid.51014$VA5.8820@clgrps13>

none wrote:
> I have written the following radixsort as part of an effort to learn 
> perl. I'd appreciate any comments, improvements, or suggestions on 
> making it more perlish.

Have you seen the radix sort example from Mastering Algorithms with Perl? 
(Chapter 4)

http://examples.oreilly.com/maperl/examples.tar.gz


John
-- 
use Perl;
program
fulfillment


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

Date: Thu, 4 Nov 2004 11:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 2.1: What machines support Perl?  Where do I get it?
Message-Id: <cmd295$c21$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.

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

2.1: What machines support Perl?  Where do I get it?

    The standard release of Perl (the one maintained by the perl development
    team) is distributed only in source code form. You can find this at
    http://www.cpan.org/src/latest.tar.gz , which is in a standard Internet
    format (a gzipped archive in POSIX tar format).

    Perl builds and runs on a bewildering number of platforms. Virtually all
    known and current Unix derivatives are supported (Perl's native
    platform), as are other systems like VMS, DOS, OS/2, Windows, QNX, BeOS,
    OS X, MPE/iX and the Amiga.

    Binary distributions for some proprietary platforms, including Apple
    systems, can be found http://www.cpan.org/ports/ directory. Because
    these are not part of the standard distribution, they may and in fact do
    differ from the base Perl port in a variety of ways. You'll have to
    check their respective release notes to see just what the differences
    are. These differences can be either positive (e.g. extensions for the
    features of the particular platform that are not supported in the source
    release of perl) or negative (e.g. might be based upon a less current
    source release of perl).



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

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: Thu, 4 Nov 2004 05:03:00 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 2.8: Where can I get information on Perl?
Message-Id: <cmcd64$723$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.

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

2.8: Where can I get information on Perl?

    The complete Perl documentation is available with the Perl distribution.
    If you have Perl installed locally, you probably have the documentation
    installed as well: type "man perl" if you're on a system resembling
    Unix. This will lead you to other important man pages, including how to
    set your $MANPATH. If you're not on a Unix system, access to the
    documentation will be different; for example, documentation might only
    be in HTML format. All proper Perl installations have fully-accessible
    documentation.

    You might also try "perldoc perl" in case your system doesn't have a
    proper man command, or it's been misinstalled. If that doesn't work, try
    looking in /usr/local/lib/perl5/pod for documentation.

    If all else fails, consult http://perldoc.cpan.org/ or
    http://www.perldoc.com/ both offer the complete documentation in html
    format.

    Many good books have been written about Perl--see the section below for
    more details.

    Tutorial documents are included in current or upcoming Perl releases
    include perltoot for objects or perlboot for a beginner's approach to
    objects, perlopentut for file opening semantics, perlreftut for managing
    references, perlretut for regular expressions, perlthrtut for threads,
    perldebtut for debugging, and perlxstut for linking C and Perl together.
    There may be more by the time you read this. The following URLs might
    also be of assistance:

        http://perldoc.cpan.org/
        http://www.perldoc.com/
        http://bookmarks.cpan.org/search.cgi?cat=Training%2FTutorials



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

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: Wed, 03 Nov 2004 21:15:14 -0500
From: Bob Walton <see@sig.invalid>
Subject: Re: Looking for C++ macro processing solution
Message-Id: <41898e71$1_1@127.0.0.1>

David Coppit wrote:

 ...
> I'm looking for a macro processor for C++ code. I can't use cpp because
> I'd like *only* to do macro expansion. (i.e. No #include or other
> directive processing.)
> 
> I can't just use s/\bFOO\b/BAR/g because FOO might appear within a
> double-quoted string. (Are there other considerations?)

Well, you probably don't want to do commentary either.  If by chance it 
is Perl code you want to preprocess, there are lots of gotchas, most of 
which are detailed in

    perldoc perlrun

under the -P switch.

> 
> Can anyone point me in the right direction?
 ...
> David

Did you check the modules on CPAN that have "CPP" or "MACRO" or 
"preprocessor" in their names?  Some of those might do what you want, or 
come close enough they can be tweaked for your purposes.
-- 
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl


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

Date: Thu, 4 Nov 2004 01:03:51 -0600
From: Ryan Thompson <a@ry.ca>
Subject: Re: Performance: longest prefix length
Message-Id: <20041104002732.O16933@coyote>


Thanks to all who replied! Some of you got me thinking in slightly
different terms. :-)

Specific replies below...

Tassilo v. Parseval wrote to :

>> &re_prefix_length topped out at about 50,000/second with
>> 5.8.5/FreeBSD.  That result isn't much better than my naive (but
>> still O(n) on string length) approach with split //, which did
>> 12,000/second. (Yes, I'm just measuring wall time, and, yes, I
>> understand the limitations).
>
> re_prefix_length() isn't really an ideal solution.

Agreed, and I didn't even write it. :-)

> You concatenate two strings, and then make an awkward pattern match
> with many '*'s and a backreference. That has to be slow.

One would think. That's mainly why I went back to C, because I *know* I
can do a quick compare that way. But I digress. :-)

> I'd expect this solution to be faster:
>
>    sub xor_prefix_length {
> 	my $s = $_[0] ^ $_[1];
> 	$s =~ /^\000+/g and return pos($s);
> 	return 0;
>    }

Indeed! That's rather clever, and (as expected) performs 5-6 times
faster than the regexp.

> The actual bottleneck is not so much the Perl code implementing the
> prefix-length but rather the function calls.

Right. So, if I inline the above function, performance improved by a
constant factor of ~3, bringing the tests per second to about 530,000,
which is about 25% slower than the Inline C function posted previously.
It's still an order of magnitude slower than pure C (with or without
inlining), but that's a drastic improvement nonetheless.

Usually, my processes are I/O bound. It's not too often I come across a
CPU bound Perl process.

- Ryan

-- 
   Ryan Thompson <ryan@sasknow.com>

   SaskNow Technologies - http://www.sasknow.com
   901-1st Avenue North - Saskatoon, SK - S7K 1Y4

         Tel: 306-664-3600   Fax: 306-244-7037   Saskatoon
   Toll-Free: 877-727-5669     (877-SASKNOW)     North America


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

Date: 3 Nov 2004 21:47:28 -0800
From: krakle@visto.com (krakle)
Subject: Re: Perl CGI project ideas
Message-Id: <237aaff8.0411032147.32cc461c@posting.google.com>

bharat.shetty@gmail.com wrote in message news:<1099447312.300707.292650@f14g2000cwb.googlegroups.com>...
> Hi all,
> 
> We have a project to develop a simple application on Linux using Perl
> and CGI. I have been totally devoid of ideas for my project becuase
> whatever I thought is being done .

Then you don't have a project to develop... And who cares if something
has already been done... Make it better.. Don't be scared of
competition...

> Could anyone provide me with gist of
> ideas for my project.

WHAT project? You don't have a project! You said you want to develop a
simple application... Why the hell would someone give you ANY unique
ideas?????

> I would appreciate if someone points me to a
> necessary application that doesnt exist on Linux but on windoze.

Are you a complete idiot? Why would ANYONE do that for you? Odds are,
if any of us had any ideas we would make it ourselves...

> Since
> I dont have too much time left , really K I S S ideas are requested.

If you don't have much time left for ideas then you don't have ANYTIME
to program at all...

> Also which books should i read as i am relatively a Perl / CGI newbie

I think you should read Perl books for beginners then novice. Get
familiar with databases.. Then maybe you will come up with some
ideas...

Oh yea you are a complete moron...


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

Date: Thu, 04 Nov 2004 06:16:36 GMT
From: shb*NO*SPAM*@comporium.net (Si Ballenger)
Subject: Re: Perl CGI project ideas
Message-Id: <4189c8f1.179184123@news.comporium.net>

On 3 Nov 2004 21:47:28 -0800, krakle@visto.com (krakle) wrote:

>bharat.shetty@gmail.com wrote in message news:<1099447312.300707.292650@f14g2000cwb.googlegroups.com>...
>> Hi all,
>> 
>> We have a project to develop a simple application on Linux using Perl
>> and CGI. I have been totally devoid of ideas for my project becuase
>> whatever I thought is being done .
>
>Then you don't have a project to develop... And who cares if something
>has already been done... Make it better.. Don't be scared of
>competition...
>
>> Could anyone provide me with gist of
>> ideas for my project.
>
>WHAT project? You don't have a project! You said you want to develop a
>simple application... Why the hell would someone give you ANY unique
>ideas?????
>
>> I would appreciate if someone points me to a
>> necessary application that doesnt exist on Linux but on windoze.
>
>Are you a complete idiot? Why would ANYONE do that for you? Odds are,
>if any of us had any ideas we would make it ourselves...
>
>> Since
>> I dont have too much time left , really K I S S ideas are requested.
>
>If you don't have much time left for ideas then you don't have ANYTIME
>to program at all...
>
>> Also which books should i read as i am relatively a Perl / CGI newbie
>
>I think you should read Perl books for beginners then novice. Get
>familiar with databases.. Then maybe you will come up with some
>ideas...
>
>Oh yea you are a complete moron...

Have you ever tried decaff?  ;-)


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

Date: Thu, 4 Nov 2004 06:20:22 +0100
From: "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de>
Subject: Re: Q: re Inline and Benchmark
Message-Id: <slrncojf0m.pr.tassilo.von.parseval@localhost.localdomain>

Also sprach Ilya Zakharevich:

> Tassilo v. Parseval
><tassilo.von.parseval@rwth-aachen.de>], who wrote in article <slrncoh12r.qs.tassilo.von.parseval@localhost.localdomain>:

>> Allocating a string, then copy it into an SV after which the string is
>> freed is also a bit wasteful. A better solution:
>> 
>>     New(1, str, l, char);
>>     ...
>>     outsv = sv_newmortal();
>>     sv_usepvn(outsv, str, l);
>>     return outsv;
>
> This is also wasteful, since usepvn() calls realloc() to add \0 at the
> end.  

Bah, true. It will do that even when the string is already null-padded. 

>I would use something like
>
>    outsv = sv_newmortal();
>    SvGROW(outsv, l);
>    str = SvPV_nolen(outsv);
>    ...
>    return outsv;

Since SvGROW will upgrade a fresh SV to a PV, one could get away with
just using SvPVX and thus save the ternary operation in SvPV_nolen. And
again half a nanosecond is gained. ;-)

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Thu, 04 Nov 2004 06:01:21 +0000
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: Q: re Inline and Benchmark
Message-Id: <4189c700$0$6541$5a62ac22@per-qv1-newsreader-01.iinet.net.au>

Ilya Zakharevich wrote:

>> and returning an 'sv_2mortal' in this case is simply redundant.
> 
> 
> sv_mortal() can never be "redundant".  It must be called *exactly* a
> particular number of times (just like free()): if you call it less,
> you get a memory leak.  If you call it more, you get a crash soon.
>
> Hope this helps,
> Ilya
> 
> P.S.  Probably you mean "approach of replacing char* with a mortal
> SV*" is redundant...
> 

No ... I meant what I said ... and, yes, I can be *that* dumb. When I 
wrote that, I wasn't paying attention to what I was saying :-)

I think I was preoccupied with the "memory leak" accusation to the 
exclusion of all other sensible thought - and I was in a hurry.

It wasn't until a few minutes later that I got around to thinking about 
it, and actually ran some code to test it out ... and then Tassilo's 
post correcting me appeared shortly after.

Cheers,
Rob

-- 
To reply by email u have to take out the u in kalinaubears.



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

Date: Thu, 04 Nov 2004 09:05:37 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Q: re Inline and Benchmark
Message-Id: <pgmjo057nbubjna10eq9an9b5q7a6m55hg@4ax.com>

On 03 Nov 2004 20:18:11 GMT, Abigail <abigail@abigail.nl> wrote:

>-: >    cmpthese 500 => {
>-: >        C     =>  'r_string',
>-: >        Loop1 => \&Loop1,
[snip]
>Indeed. So, \&Loop1 calls one sub per iteration (the sub "Loop1"), and
>'r_string' calls one sub per iteration (the sub "r_string").
>
>I did it this way to be sure it's fair - all the benchmarks now call
>the same number of subs.

That was clear enough. What I'm bothered about is that different
methods by which these subs are called may introduce different
overheads. Now, this bias may become negligible as soon as sub
execution times get long enough, but I'm not sure about how much that
"enough" could be.

In other words, IMHO a fair comparison would be that between

             C     =>  'r_string',
             Loop1 => 'Loop1',

and if needed I will stick to that. However, more generally speaking,
is there a way I can take a reference of an Inline sub?


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 4 Nov 2004 09:13:07 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Q: re Inline and Benchmark
Message-Id: <cmcrr3$fve$1@mamenchi.zrz.TU-Berlin.DE>

Michele Dondi  <bik.mido@tiscalinet.it> wrote in comp.lang.perl.misc:

[...]

> and if needed I will stick to that. However, more generally speaking,
> is there a way I can take a reference of an Inline sub?

It's in no way different from a normal sub: "\&foo".

Anno


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

Date: Thu, 04 Nov 2004 09:35:51 +0000
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: Q: re Inline and Benchmark
Message-Id: <4189f946$0$6551$5a62ac22@per-qv1-newsreader-01.iinet.net.au>

Anno Siegel wrote:
> Michele Dondi  <bik.mido@tiscalinet.it> wrote in comp.lang.perl.misc:
> 
> [...]
> 
> 
>>and if needed I will stick to that. However, more generally speaking,
>>is there a way I can take a reference of an Inline sub?
> 
> 
> It's in no way different from a normal sub: "\&foo".

Hmmm ... that's not what I'm finding.

If I do \&foo all I get is a "Usage:" warning telling me that it needs 
to be foo() - and when I try \&foo() I get a slightly different "usage:" 
warning telling me (in effect) that I need to use 'timethis' (and *no* 
sub reference) instead of 'cmpthese' (with a sub reference).

Seems to me that Inline subs are not like normal subs in that, although 
they belong to package "main", they belong to (something like) module 
"scriptname_pl_****" where the * stands for a hex digit.

I'm thinking maybe Michele's question amounts to "how do I take a 
reference of a loaded module's sub?" (in the context of Benchmark's 
'cmpthese'). I don't know the answer to that.

Cheers,
Rob

-- 
To reply by email u have to take out the u in kalinaubears.



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

Date: Thu, 04 Nov 2004 10:40:41 +0000
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: Q: re Inline and Benchmark
Message-Id: <418a0878$0$6544$5a62ac22@per-qv1-newsreader-01.iinet.net.au>

Michele Dondi wrote:
> On Wed, 03 Nov 2004 06:21:14 +0000, Sisyphus
> <kalinaubears@iinet.net.au> wrote:
> 
> 
>>>more on-topic: is there any caveat with benchmarks carried on
>>>Inline::C subs? I don't think so, but just to be sure...
>>
>>I've benchmarked hundreds of Inline::C subs and never struck any.
> 
> 
> So, since you've been so gentle answering this particular question of
> mine, could you please be so kind and answer the other ones too? I am
> aware that my OP was probably too verbose...
> 

Well ... I didn't really understand the other questions (partly because 
I hadn't followed the original thread) and I assumed that Abigail had 
adequately answered them. All I really wanted to assure you of is that 
"I've benchmarked hundreds of Inline::C subs and never struck any" 
caveats :-)

Of course, I've only ever used 'timethese()' ... and I'm now starting to 
realise that the issue you're raising is in regard to 'cmpthese()' and 
references to Inline subroutines. Mind you - no matter what - I'm going 
to insist that any caveats are "Benchmark" caveats and not "Inline::C" 
caveats :-)

I've since taken a look at the original thread and noted that Abigail 
posted the same (leaking) code there - and that no-one mentioned the 
fact that it leaks. What I'm now wondering is whether the leak was not 
mentioned because:
a) no-one noticed it;
or because:
b) code that leaks is of little concern, and generally not considered 
worth mentioning.

(I hate to think that I'm guilty of nitpicking over some minor code 
imperfection. If that's what I did, could someone please let me know, so 
that I can be sure not to re-offend in the future.)

Cheers,
Rob

-- 
To reply by email u have to take out the u in kalinaubears.



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

Date: Thu, 04 Nov 2004 08:22:15 GMT
From: Jean-Louis Leroy <jll@soundobjectlogic.com>
Subject: Re: Rlogin client?
Message-Id: <lzlldi6n2h.fsf@toots.sol>

Abigail <abigail@abigail.nl> writes:

> Jean-Louis Leroy (jll@soundobjectlogic.com) wrote on MMMMLXXXII September
> MCMXCIII in <URL:news:lzk6t2sxl4.fsf@toots.sol>:
> }}  Anybody knows of a rlogin client-in-a-module? Surprisingly I don't
> }}  find one on CPAN.

> You might want to try Net::Telnet.

Telnet and rlogin don't use the same protocol, do they?

Here's a bit of context. I'm building a test suite that needs to run
commands on remote computers. Remote login without password is provided
(via .rhosts files). In fact, not all the accounts I need to access have
a password. That's why I need rlogin instead of telnet...
-- 
Jean-Louis Leroy
Sound Object Logic
http://www.soundobjectlogic.com


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

Date: 04 Nov 2004 08:37:38 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Rlogin client?
Message-Id: <slrncojqii.mg8.abigail@alexandra.abigail.nl>

Jean-Louis Leroy (jll@soundobjectlogic.com) wrote on MMMMLXXXIII
September MCMXCIII in <URL:news:lzlldi6n2h.fsf@toots.sol>:
??  Abigail <abigail@abigail.nl> writes:
??  
?? > Jean-Louis Leroy (jll@soundobjectlogic.com) wrote on MMMMLXXXII September
?? > MCMXCIII in <URL:news:lzk6t2sxl4.fsf@toots.sol>:
?? > }}  Anybody knows of a rlogin client-in-a-module? Surprisingly I don't
?? > }}  find one on CPAN.
??  
?? > You might want to try Net::Telnet.
??  
??  Telnet and rlogin don't use the same protocol, do they?

No, but you can use your telnet client to connect to an rlogin port
as well. You might need to talk a bit of rlogin protocol yourself.

??  Here's a bit of context. I'm building a test suite that needs to run
??  commands on remote computers. Remote login without password is provided
??  (via .rhosts files). In fact, not all the accounts I need to access have
??  a password. That's why I need rlogin instead of telnet...


Any reason why

    system rsh => 'user@host', 'command';

wouldn't do the trick?



Abigail
-- 
perl -wle 'print "Prime" if (0 x shift) !~ m 0^\0?$|^(\0\0+?)\1+$0'


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

Date: Wed, 3 Nov 2004 21:30:54 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: The most perfect beginning
Message-Id: <vvgid.22050$OD3.1032519@news20.bellglobal.com>


"Tad McClellan" <tadmc@augustmail.com> wrote in message 
news:slrncoi2qq.6d4.tadmc@magna.augustmail.com...
> Todd de Gruyl <todd@tdegruyl.com> wrote:
>> On 11/3/04 11:27, wana wrote:
>
>>> I was wondering what people think is the most perfect general
>>> beginning to a Perl program that could be used in most or all
>>> programs.
>
>
>> I always start with:
>
> [snip]
>
>
> I always start with this "skeleton" program:
>
> --------------------------
> #!/usr/bin/perl
> # progname - one-line description of what progname does
> use warnings;
> use strict;
>
> while ( <> ) {
>
>
>   print;
> }
> --------------------------
>
>
> Most of my programs are "rip through a file and do something with each 
> line".
>
> I've adopted the convention on the 2nd line so that I can use File::Find
> to identify and list every Perl program that I've ever written.
>

The importance of which can't be stressed enough. I write so many scripts to 
do the same kind of thing, and usually only revisit them once a year 
(cyclical pattern to the work I do). Without a description of what the 
script does, it can be a pain to remember why you wrote two sorting 
programs, for example, and which you should be using for what.

Matt 




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

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


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