[25013] in Perl-Users-Digest
Perl-Users Digest, Issue: 7263 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Oct 17 14:07:10 2004
Date: Sun, 17 Oct 2004 11:05:07 -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 Sun, 17 Oct 2004 Volume: 10 Number: 7263
Today's topics:
Re: A perl reporting paradigm?? <dha@panix.com>
Re: building anonymous arrays and adding reference to m <ebohlman@omsdev.com>
Re: C (I think) to Perl Conversion <NOdj.athensSPAM@surfeu.fi>
Re: C (I think) to Perl Conversion <spamtrap@dot-app.org>
Re: C (I think) to Perl Conversion <jurgenex@hotmail.com>
Re: C (I think) to Perl Conversion <spamtrap@dot-app.org>
Re: Finding duplicate sub-expressions in calculator gra <abigail@abigail.nl>
How to checking a file that writing is complete? <sonet@msa.hinet.net>
Re: How to checking a file that writing is complete? <Joe.Smith@inwap.com>
Re: How to checking a file that writing is complete? <autismuk@autismuk.muralichucks.freeserve.co.uk>
Re: How to checking a file that writing is complete? <sonet@msa.hinet.net>
Re: How to checking a file that writing is complete? <abigail@abigail.nl>
install Bundle::CPAN in Cygwin failed (sea)
Re: Is this really legal? <wisnij@gmail.com>
Re: Is this really legal? <bik.mido@tiscalinet.it>
Re: Is this really legal? <abigail@abigail.nl>
Re: Is this really legal? <abigail@abigail.nl>
Re: Recursive directory removing? <abigail@abigail.nl>
Redirect with no referer... <webmasterspam@rdsoftware.de>
Re: Redirect with no referer... <tadmc@augustmail.com>
removing duplics in an array <g-preston1@ti.com>
Re: removing duplics in an array <noreply@gunnar.cc>
Re: Top posting (was Re: Concatenating an array into on <bik.mido@tiscalinet.it>
Re: Win2k - Ping - improved. <ftoewe@austin.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 17 Oct 2004 07:47:31 +0000 (UTC)
From: "David H. Adler" <dha@panix.com>
Subject: Re: A perl reporting paradigm??
Message-Id: <slrncn48sj.1cb.dha@panix2.panix.com>
On 2004-10-16, Tad McClellan <tadmc@augustmail.com> wrote:
> Sherm Pendley <spamtrap@dot-app.org> wrote:
>
>> It's called a "here-doc". It's described in "perldoc perlop", in the
>> "Quote and Quote-like Operators" section.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>
> And it is in that section because it is merely another way of
> quoting a string, hardly deserving of a "paradigm" label. :-)
One small note: If your perl is moderately old, it may be somewhere in
perldata, rather than perlpod.
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"scanf() is evil."
------------------------------
Date: 17 Oct 2004 05:09:57 GMT
From: Eric Bohlman <ebohlman@omsdev.com>
Subject: Re: building anonymous arrays and adding reference to main array
Message-Id: <Xns95852A188FF8ebohlmanomsdevcom@130.133.1.4>
ioneabu@yahoo.com (wana) wrote in
news:bf0b47ca.0410130635.2a05dffc@posting.google.com:
> On the other hand, I am glad that I did now because the splice thing
> is really cool. I have my book open now to p. 793 (3rd ed.
> revised,updated). I really have to read this book at least once and
> probably 2,3 times before asking basic questions. I need a time warp
> to go into so I will have a few weeks to read and no real time will
> have passed.
If you can easily deal with explanations that are a bit more terse than
those found in the Camel book, you might try:
perldoc perlreftut
perldoc perlref
perldoc perldsc
which should get you up to speed in much less time than "a few weeks."
------------------------------
Date: Sun, 17 Oct 2004 13:23:48 +0300
From: "Jussi Mononen" <NOdj.athensSPAM@surfeu.fi>
Subject: Re: C (I think) to Perl Conversion
Message-Id: <ckth75$b73$1@nyytiset.pp.htv.fi>
>> ! is single line comment not requiring an end comment
>
> I don't know what language you're talking about, but it's not C.
> Single-line comments in C begin with "//".
Actually it is not, "//" is a C++ single-line comment, but *most*
C-compilers accept it by default.
I would suggest that every Perl programmer would try to learn C, as it is
the language Perl itself is written with :-)
--
/jUSSi
Please, Emit Readable Language
------------------------------
Date: Sun, 17 Oct 2004 09:30:43 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: C (I think) to Perl Conversion
Message-Id: <muudnZfPGveZ6e_cRVn-vg@adelphia.com>
Jussi Mononen wrote:
> Actually it is not, "//" is a C++ single-line comment, but *most*
> C-compilers accept it by default.
Actually it is. :-) Single-line comments are included in the current C99
standard. They weren't part of the C89 standard, but as you say, most
compilers accepted them anyway.
> I would suggest that every Perl programmer would try to learn C, as it is
> the language Perl itself is written with :-)
Indeed. It's also fairly easy to create Perl modules that wrap C libraries.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Sun, 17 Oct 2004 14:47:56 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: C (I think) to Perl Conversion
Message-Id: <wCvcd.5545$232.1615@trnddc09>
Sherm Pendley wrote:
> Jussi Mononen wrote:
>> I would suggest that every Perl programmer would try to learn C, as
>> it is the language Perl itself is written with :-)
>
> Indeed.
Really? I would have thought that Perl was written in English and maybe POD
or EBNF or so.
In case you are talking about perl: It would be a very poor language design
if the language of the compiler/interpreter would have any influence on the
language to be compiled/interpreted.
jue
------------------------------
Date: Sun, 17 Oct 2004 11:28:13 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: C (I think) to Perl Conversion
Message-Id: <QfadnSUM3asQEu_cRVn-tw@adelphia.com>
Jürgen Exner wrote:
> Really? I would have thought that Perl was written in English and maybe POD
> or EBNF or so.
There is no ISO/ANSI/ECMA or other standard for Perl - Perl is as perl
does. In fact, the most concise, accurate definition of the language
Perl is the C code that implements the interpreter perl.
There are, of course, more or less accurate approximations of that
definition in any number of languages - English and other spoken
languages, BNF grammars, POD markup, etc.
> In case you are talking about perl: It would be a very poor language design
> if the language of the compiler/interpreter would have any influence on the
> language to be compiled/interpreted.
It's not so much C's influence on the language design that makes
learning it a good idea. It's the use of C to implement the interpreter,
which is essentially the definition of the language, that does so.
Understanding C makes it possible to dive into the perl source, thereby
gaining a far deeper understanding of just what goes on when your Perl
code runs.
It also makes it possible to extend Perl with XS modules. Much of Perl's
usefulness stems from its extensibility - the facility with which it can
act as the high-level glue that holds together any number of low-level
components.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: 17 Oct 2004 17:59:59 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Finding duplicate sub-expressions in calculator grammar
Message-Id: <slrncn5cou.34g.abigail@alexandra.abigail.nl>
andrew (arsf10@yahoo.com) wrote on MMMMLXIV September MCMXCIII in
<URL:news:pan.2004.10.16.20.02.15.906653@yahoo.com>:
@@
@@ i've written a parser in perl for a simple arithmetic grammar
@@ {+,-,*,/,funtion ()} where each operation is potentially expensive to
@@ evaluate. the parser outputs an AST tree that is stored for each of a set
@@ of spreadsheet-like cells that can then be re-evaluated with different
@@ inputs.
@@
@@ currently, if there are expressions like:
@@
@@ (A+B)+f(A+B)
@@ A+B+A+B
@@
@@ the sub-expression A+B gets evaluated more than once when evaluating the
@@ AST tree for that expression. i'd like them to be evaluated only once as
@@ doing A+B can be expensive.
@@
@@ is there a clever way to pre-parse each expression with a regexp to make a
@@ list of identical subexpressions (maybe making a list of expressions with
@@ temporary variables, to be evaluated in succession, like C=A+B, C+f(C))?
The clever way would be to NOT do this before you parse the expression.
You certainly don't want to find a "common" subexpression A + B in:
f(A + B) + A + B * C
which you would if you solve this before parsing.
Abigail
--
BEGIN {$^H {q} = sub {$_ [1] =~ y/S-ZA-IK-O/q-tc-fe-m/d; $_ [1]}; $^H = 0x28100}
print "Just another PYTHON hacker\n";
------------------------------
Date: Sun, 17 Oct 2004 10:32:36 +0800
From: "news.hinet.net" <sonet@msa.hinet.net>
Subject: How to checking a file that writing is complete?
Message-Id: <ckt7iq$mkn$1@netnews.hinet.net>
I must mv a logfile to other directory that generate by another program.
Will I got incomplete file if move a file that writing is not complete ?
one process proc1
system("mv /a/c/logfile /a/b/logfile");
and the other process proc2
open(handle,"/a/b/logfile")
ps: os->unix or linux
------------------------------
Date: Sun, 17 Oct 2004 08:16:07 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: How to checking a file that writing is complete?
Message-Id: <bTpcd.143051$He1.29216@attbi_s01>
news.hinet.net wrote:
> I must mv a logfile to other directory that generate by another program.
> Will I got incomplete file if move a file that writing is not complete ?
It depends on whether the original directory and the destination directory
are on the same file system. If yes, 'mv' does a rename without changing
the inode; open file handles are still valid. If no, 'mv' does a copy
and delete; you may end up with a large file that is still open but has
no name.
As to checking whether a file is still open for writing, perl can't
do it if the OS + file-system don't support that functionality.
-Joe
------------------------------
Date: Sun, 17 Oct 2004 09:43:25 +0100
From: Paul Robson <autismuk@autismuk.muralichucks.freeserve.co.uk>
Subject: Re: How to checking a file that writing is complete?
Message-Id: <cktb8b$1si$1@newsg4.svr.pol.co.uk>
news.hinet.net wrote:
> one process proc1
> system("mv /a/c/logfile /a/b/logfile");
>
> and the other process proc2
> open(handle,"/a/b/logfile")
>
> ps: os->unix or linux
I presume these are running in parallel.
Aren't there semaphores in Perl ?
------------------------------
Date: Sun, 17 Oct 2004 17:30:13 +0800
From: "news.hinet.net" <sonet@msa.hinet.net>
Subject: Re: How to checking a file that writing is complete?
Message-Id: <ckte47$cju$1@netnews.hinet.net>
What is the definition of the original directory and the destination
directory
are on the same file system??
The meaning is the same partition , the same filesystem type(ex. NTFS
<->NTFS) or
the same HardDisk?
Sorry! My english is very poor!
"Joe Smith" <Joe.Smith@inwap.com> ??? news:bTpcd.143051$He1.29216@attbi_s01
???...
> news.hinet.net wrote:
>
> > I must mv a logfile to other directory that generate by another program.
> > Will I got incomplete file if move a file that writing is not complete ?
>
> It depends on whether the original directory and the destination directory
> are on the same file system. If yes, 'mv' does a rename without changing
> the inode; open file handles are still valid. If no, 'mv' does a copy
> and delete; you may end up with a large file that is still open but has
> no name.
>
> As to checking whether a file is still open for writing, perl can't
> do it if the OS + file-system don't support that functionality.
> -Joe
------------------------------
Date: 17 Oct 2004 18:02:05 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: How to checking a file that writing is complete?
Message-Id: <slrncn5cst.34g.abigail@alexandra.abigail.nl>
news.hinet.net (sonet@msa.hinet.net) wrote on MMMMLXV September MCMXCIII
in <URL:news:ckt7iq$mkn$1@netnews.hinet.net>:
** I must mv a logfile to other directory that generate by another program.
** Will I got incomplete file if move a file that writing is not complete ?
**
** one process proc1
** system("mv /a/c/logfile /a/b/logfile");
That depends on your OS, the implementation of your 'mv' command, and
possibly whether "/a/c/logfile" and "/a/b/logfile" are on the same file
system. On some OSses, you might not even be able to move an open file.
It's certainly not Perl issue.
Abigail
--
split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};
------------------------------
Date: 17 Oct 2004 08:09:33 -0700
From: seasea@hotmail.com (sea)
Subject: install Bundle::CPAN in Cygwin failed
Message-Id: <f6070577.0410170709.35dd1af6@posting.google.com>
Hi all,
I am using Perl 5.8.5 in Cygwin. I tried to install packages from
cpan but failed. It gives the following eorrs when I installed
Bundle::CPAN
Running make install
Cannot forceunlink /usr/lib/perl5/5.8.5/cygwin-thread-multi-64int/auto/Cwd/Cwd.d
ll: Permission denied at /usr/lib/perl5/5.8.5/File/Find.pm line 906
make: *** [pure_perl_install] Error 255
/usr/bin/make install -- NOT OK
Running install for module Digest::MD5
Running make for G/GA/GAAS/Digest-MD5-2.33.tar.gz
Undefined subroutine &Digest::base::new called at
/usr/lib/perl5/5.8.5/CPAN.pm l
ine 4344.
I have no clue at all. BTW, I am not an admin in this computer.
Thanks for any of your ideas.
Best,
seasea
------------------------------
Date: Sun, 17 Oct 2004 06:16:54 +0000 (UTC)
From: Xaonon <wisnij@gmail.com>
Subject: Re: Is this really legal?
Message-Id: <slrncn46tu.p90.wisnij@xaonon.dyndns.org>
Ned i bach <slrncn3pjf.gm0.tadmc@magna.augustmail.com>, Tad McClellan
<tadmc@augustmail.com> teithant i thiw hin:
> wana <ioneabu@yahoo.com> wrote:
>
> > $outfile = $infile if not defined $outfile;
> >
> > This nearly plain English version seemed to work equally well.
>
> The English can be even plainer:
>
> $outfile = $infile unless defined $outfile;
You know, I see people say this, but to me the "if not defined" version
reads better. I always have to stop and think longer when I hit an unless
than an if. I don't know whether it it's just being used to languages
having only an "if", or because there's no matching "elsunless", or what,
but the effect is pronounced.
--
Xaonon, EAC Chief of Mad Scientists and informal BAAWA, aa #1821, Kibo #: 1
http://xaonon.dyndns.org/ Guaranteed content-free since 1999. No refunds.
"Would someone please tackle Donald Rumsfeld and lock his ass up until our
`Countries-Destroyed-to-Countries-Rebuilt' ratio is closer to `1'?" -- GYWO
------------------------------
Date: Sun, 17 Oct 2004 15:37:32 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Is this really legal?
Message-Id: <89t4n0dsc5uckbv84tqmubcshjsa26fuht@4ax.com>
On Sat, 16 Oct 2004 22:54:06 -0400, wana <ioneabu@yahoo.com> wrote:
>if (!defined $outfile) {$outfile = $infile;}
>
>I then decided to live dangerously and see if the following would work:
^^^^^^^^^^^
^^^^^^^^^^^
Huh?!? Aren't you exaggerating a little bit? ;-)
>$outfile = $infile if not defined $outfile;
*Almost* the same:
$outfile ||= $infile;
But then, were we speaking Perl6 rather than Perl5,
$outfile //= $infile;
would be *exactly* the same. Now I may be utterly wrong but IIRC
C<//=> is supposed to be incorporated in Perl5 along some next major
release, isnt it?
As of now C<?:> could be used instead, but then it'd be too verbose...
well, topicalization may be a cure:
$_ = defined ? $_ : $infile for $outfile;
But then should I really adopt it, I'd rather do it like this:
defined or $_ = $infile for $outfile;
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: 17 Oct 2004 17:51:21 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Is this really legal?
Message-Id: <slrncn5c8p.34g.abigail@alexandra.abigail.nl>
Tim Hammerquist (tim@vegeta.ath.cx) wrote on MMMMLXV September MCMXCIII
in <URL:news:slrncn3pl4.gb9.tim@vegeta.saiyix>:
!! wana <ioneabu@yahoo.com> wrote:
!! > I wrote the following simple statement today which is simple, safe,
!! > and legal:
!! >
!! > if (!defined $outfile) {$outfile = $infile;}
!! >
!! > I then decided to live dangerously and see if the following would
!! > work:
!! >
!! > $outfile = $infile if not defined $outfile;
!!
!! This is perfectly legal Perl code and is in fact fairly idiomatic.
!!
!! A Perl Guru might actually write it even more "dangerously":
!!
!! $outfile = $infile unless defined $outfile;
!!
!! defined $outfile or $outfile = $infile;
!!
!! It's even probably that the following would work in your script:
!!
!! $outfile ||= $infile;
Or if your Perl has the 'dor' patch:
$outfile //= $infile;
Abigail
--
perl -wle 'eval {die ["Just another Perl Hacker"]}; print ${$@}[$#{@${@}}]'
------------------------------
Date: 17 Oct 2004 17:53:00 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Is this really legal?
Message-Id: <slrncn5cbs.34g.abigail@alexandra.abigail.nl>
Michele Dondi (bik.mido@tiscalinet.it) wrote on MMMMLXV September
MCMXCIII in <URL:news:89t4n0dsc5uckbv84tqmubcshjsa26fuht@4ax.com>:
`` On Sat, 16 Oct 2004 22:54:06 -0400, wana <ioneabu@yahoo.com> wrote:
``
`` >if (!defined $outfile) {$outfile = $infile;}
`` >
`` >I then decided to live dangerously and see if the following would work:
`` ^^^^^^^^^^^
`` ^^^^^^^^^^^
``
`` Huh?!? Aren't you exaggerating a little bit? ;-)
``
`` >$outfile = $infile if not defined $outfile;
``
`` *Almost* the same:
``
`` $outfile ||= $infile;
``
`` But then, were we speaking Perl6 rather than Perl5,
``
`` $outfile //= $infile;
``
`` would be *exactly* the same. Now I may be utterly wrong but IIRC
`` C<//=> is supposed to be incorporated in Perl5 along some next major
`` release, isnt it?
5.9.1 has it. And patches for all releases since 5.8.1 are available.
I always patch my Perl to have this operator.
Abigail
--
perl -wle 'sub _ "Just another Perl Hacker"; print prototype \&_'
------------------------------
Date: 17 Oct 2004 18:04:12 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Recursive directory removing?
Message-Id: <slrncn5d0s.34g.abigail@alexandra.abigail.nl>
MM (dobedidoo@yahoo.se) wrote on MMMMLXIV September MCMXCIII in
<URL:news:n1bcd.6376$1p.5442@nntpserver.swip.net>:
}} Hi,
}}
}} Can anyone give me some hint on how I in a perl script can remove all
}} directories, subdirectories, and files (recursively) in a specific directory
}} that I state? Pretty much like the 'rm -fR' system command, except that I do
}} not want to use the 'system' command. I looked at the 'unlink' function, but
}} I could not see how this can be used to remove subdirectories as well.
You'd remove directories with the 'rmdir' function call.
I'd use "system rm => '-rR'", but that's just me I guess.
Abigail
--
#!/opt/perl/bin/perl -w
$\ = $"; $; = $$; END {$: and print $:} $SIG {TERM} = sub {$ := $_}; kill 15 =>
fork and ($; == getppid and exit or wait) foreach qw /Just another Perl Hacker/
------------------------------
Date: Sun, 17 Oct 2004 11:27:36 +0200
From: Erik Rull <webmasterspam@rdsoftware.de>
Subject: Redirect with no referer...
Message-Id: <cktdso$vv$02$1@news.t-online.com>
Hi,
I wrote a webmailer and want to "derefer" links that are clicked within
mails, so that no session or any other param are in the referer-field of
the target server.
I had this attempt:
#!/usr/bin/perl
print "Refresh:1;URL=http://www.server.to/click.on\n\n";
But the referer is only killed in some browsers, some versions of the
MSIE still take the referer with.
Bug or feature? ;-)
Any other ideas?
Greets,
Erik
------------------------------
Date: Sun, 17 Oct 2004 08:32:58 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Redirect with no referer...
Message-Id: <slrncn4t4a.rie.tadmc@magna.augustmail.com>
Erik Rull <webmasterspam@rdsoftware.de> wrote:
> I wrote a webmailer and want to "derefer" links that are clicked within
> mails, so that no session or any other param are in the referer-field of
> the target server.
>
> I had this attempt:
>
> #!/usr/bin/perl
>
> print "Refresh:1;URL=http://www.server.to/click.on\n\n";
If you are having trouble with Perl's print() function then
you have a Perl question.
Are you having trouble with Perl's print() function?
> But the referer is only killed in some browsers, some versions of the
> MSIE still take the referer with.
> Bug or feature? ;-)
>
> Any other ideas?
Ask Perl questions in a Perl newsgroup.
Ask web questions (like yours) in a web newsgroup.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 17 Oct 2004 04:33:40 -0500
From: "Jerry Preston" <g-preston1@ti.com>
Subject: removing duplics in an array
Message-Id: <ckte9k$7bf$1@home.itg.ti.com>
Hi!
I am able to remove duplets in a simple array:
@name = grep { ! $name_{ $_ }++ } @name_;
But can I do it for each array in a has of arrays?
@{ $ID{ $id }{ data }} = grep { ! ${ $ID{ $id }{ data }}{ $_ }++ } @{
$ID{ $id }{ data }};
Thanks,
Jerry
------------------------------
Date: Sun, 17 Oct 2004 14:45:57 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: removing duplics in an array
Message-Id: <2tf89tF1urr0hU1@uni-berlin.de>
Jerry Preston wrote:
> I am able to remove duplets in a simple array:
>
> @name = grep { ! $name_{ $_ }++ } @name_;
>
> But can I do it for each array in a has of arrays?
Yes, of course.
> @{ $ID{ $id }{ data }} = grep { ! ${ $ID{ $id }{ data }}{ $_ }++ } @{
------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What do you think you access with that? Why would you like the counter
to be part of the data structure?
Just do like this:
for my $id ('id1', 'id2') {
my %count;
@{ $ID{$id}{data} } = grep { ! $count{$_}++ } @{ $ID{$id}{data} };
}
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Sun, 17 Oct 2004 15:37:30 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Top posting (was Re: Concatenating an array into one string?)
Message-Id: <acq4n05ddbiclr1enabdsg09u72r1501fn@4ax.com>
On Sat, 16 Oct 2004 15:47:59 +0100, Henry Law
<lawshouse.public@btconnect.com> wrote:
>The half is those like me who know that bottom-posting is the accepted
>thing (and that unlike top-posting will never get you flamed) and
As a minor point, I notice that people keep using "bottom-posting" as
opposed to "top-posting", but I think that it's just to find a quick
term... however "pure bottom-posting" even if slightly more manageable
than top-posting suffers just as much from the severe problem of
quoting unnecessary material, and in some respects can be even worse,
for one *may* have to scroll down a long quoted part before finding
the original content.
So, just to be pedantic, I'd stress that the correct opposite of
"top-posting" we're (almost) all referring to here is "quoting
properly", or "interleaving": well I don't know if there's even a
precise term to identify it...
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: Sun, 17 Oct 2004 15:12:29 GMT
From: "Fred Toewe" <ftoewe@austin.rr.com>
Subject: Re: Win2k - Ping - improved.
Message-Id: <xZvcd.8835$rY1.5361@fe2.texas.rr.com>
"Kevin Joseph" <kejoseph@hotmail.com> wrote in message
news:54c48ac0.0410150738.2e1a69e3@posting.google.com...
> Hi Sinan,
>
> Thanks for responding. Note that when I run the exact same code on
> Linux, it works just fine. Dont know why it does not work in Win2k.
>
> A little more research revealed that the sleep statement is causing a
> problem. If I dont have a sleep statement, it works fine. In place of
> a sleep statement if I have a "system(pause)" statement, I get the
> same results. Pretty strange.
>
> Kevin.
If you substitute the usleep function for sleep and alter the sleep time,
I find that at about 200,000 usec., the loop returns reasonable values
about half of the time.
Sun Oct 17 10:06:41 2004 Old desktop [ip: hidden] is alive : time : 2.76899
ms)
Sun Oct 17 10:06:41 2004 Old desktop [ip: hidden] is alive : time : 1.58596
ms)
Sun Oct 17 10:06:41 2004 Old desktop [ip: hidden] is alive : time : 1.55210
ms)
Sun Oct 17 10:06:41 2004 Old desktop [ip: hidden] is alive : time : 0.00000
ms)
Sun Oct 17 10:06:42 2004 Old desktop [ip: hidden] is alive : time : 0.00000
ms)
This makes me suspect the Hires module.
Fred
------------------------------
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 7263
***************************************