[22730] in Perl-Users-Digest
Perl-Users Digest, Issue: 4951 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 7 06:10:37 2003
Date: Wed, 7 May 2003 03:10:11 -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 Wed, 7 May 2003 Volume: 10 Number: 4951
Today's topics:
Re: How do you create a biniary file in Perl. <tassilo.parseval@rwth-aachen.de>
Re: How do you create a biniary file in Perl. <nmihai_2000@yahoo.com>
Re: How do you create a biniary file in Perl. <fxn@hashref.com>
Re: How do you create a biniary file in Perl. <josef.moellers@fujitsu-siemens.com>
Re: How do you create a biniary file in Perl. <tassilo.parseval@rwth-aachen.de>
Re: How do you create a biniary file in Perl. <REMOVEsdnCAPS@comcast.net>
Re: How do you create a biniary file in Perl. <bart.lateur@pandora.be>
Re: In search of elegant code - parameter in grep? (David Filmer)
Re: Including files in Perl <ubl@schaffhausen.de>
Re: Locking and updating files... <look@my.signature>
Re: Locking and updating files... (Anno Siegel)
Re: Open With? (Tramm Hudson)
Re: Open With? <uri@stemsystems.com>
Re: Open With? (Helgi Briem)
Re: perl compiler for win32 platform? <simon.andrews@bbsrc.ac.uk>
RegExp Puzzle <simon.oliver@nospam.umist.ac.uk>
Re: RegExp Puzzle <thomas.haselberger@ucpmorgen.com>
Re: removing last char of string <kasp@epatra.com>
Re: removing last char of string <tassilo.parseval@rwth-aachen.de>
Sendmail::Milter fails under load <danny@lennon.postino.com>
Re: shipping perl (Prashanth)
Re: What is this nntp.perl.org thing; seems nifty <tassilo.parseval@rwth-aachen.de>
Write both fd0 and fd1 <6e777a6d617474@6e65747363617065.6e6574>
Re: Write both fd0 and fd1 <News@LearnQuick.Com>
Re: Write both fd0 and fd1 (Anno Siegel)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 7 May 2003 05:16:11 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: How do you create a biniary file in Perl.
Message-Id: <b9a4qr$k16$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Xavier Noria:
> In article <b98s0e$gqb$1@nets3.rz.RWTH-Aachen.DE>, Tassilo v. Parseval wrote:
>
>: I think you don't even need binmode() if you are writing the characters
>: implicitely by providing their octal or hexadecimal value.
>
> What do you mean here?
This (assuming Windows):
open F, ">test" or die ...;
print F "\n";
close F;
Should produce "13 10" (in octet-notation, that is "\r\n"). But if you
really only wanted the bare newline (not the Win newline), you could
write:
...
binmode F;
print F "\n";
# or without binmode
print F "\012";
"\n" is a logical newline that gets translated into the respective
presentation of the underlying operating system. Such a translation does
not happen for "\012".
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: Wed, 07 May 2003 06:21:51 GMT
From: "Mihai N." <nmihai_2000@yahoo.com>
Subject: Re: How do you create a biniary file in Perl.
Message-Id: <Xns9373EDC00325AMihaiN@204.127.199.17>
> binmode F;
> print F "\n";
>
> # or without binmode
> print F "\012";
>
> "\n" is a logical newline that gets translated into the respective
> presentation of the underlying operating system. Such a translation
> does not happen for "\012".
Warning!
I just tested it on Windows and if you don't use binmode the result for
both "\n" and "\012" is 0D 0A.
Mihai
------------------------------
Date: Wed, 7 May 2003 07:16:02 +0000 (UTC)
From: Xavier Noria <fxn@hashref.com>
Subject: Re: How do you create a biniary file in Perl.
Message-Id: <b9abri$lm2$1@news.ya.com>
In article <b9a4qr$k16$1@nets3.rz.RWTH-Aachen.DE>, Tassilo v. Parseval wrote:
: Should produce "13 10" (in octet-notation, that is "\r\n"). But if you
: really only wanted the bare newline (not the Win newline), you could
: write:
:
: ...
: binmode F;
: print F "\n";
:
: # or without binmode
: print F "\012";
:
: "\n" is a logical newline that gets translated into the respective
: presentation of the underlying operating system. Such a translation does
: not happen for "\012".
I thought that also some time ago, but after the thread "doubts on \n" it
was clear that "\n" eq "\012" on Windows and the I/O system does not
distinguish them, so both are translated if the filehandle is not binmoded.
I even wonder whether the compiler transalates literal "\n"s to "\012"s on
Windows when processes the source, so they actually are the same thing in
the compiled program. But I don't know this.
-- fxn
------------------------------
Date: Wed, 07 May 2003 09:44:44 +0200
From: Josef =?iso-8859-1?Q?M=F6llers?= <josef.moellers@fujitsu-siemens.com>
Subject: Re: How do you create a biniary file in Perl.
Message-Id: <3EB8B96C.D17C6943@fujitsu-siemens.com>
Xavier Noria wrote:
> I thought that also some time ago, but after the thread "doubts on \n" =
it
> was clear that "\n" eq "\012" on Windows and the I/O system does not
> distinguish them, so both are translated if the filehandle is not binmo=
ded.
> =
> I even wonder whether the compiler transalates literal "\n"s to "\012"s=
on
> Windows when processes the source, so they actually are the same thing =
in
> the compiled program. But I don't know this.
The proof of the pudding would be in the eating. I don't have a Windows
system with Perl installed at hand, but
if ("\n" eq "\012") { print "equal\n"; } else { print "not equal\n"; }
would show it.
But since the Camel book does not fix "\n" as being LF, anything is
possible.
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
Date: 7 May 2003 08:01:19 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: How do you create a biniary file in Perl.
Message-Id: <b9aegf$nh$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Mihai N.:
>> binmode F;
>> print F "\n";
>>
>> # or without binmode
>> print F "\012";
>>
>> "\n" is a logical newline that gets translated into the respective
>> presentation of the underlying operating system. Such a translation
>> does not happen for "\012".
> Warning!
> I just tested it on Windows and if you don't use binmode the result for
> both "\n" and "\012" is 0D 0A.
Hmmh, nasty. So I was wrong and Xavier's and Josef's posting suggest
that things are perhaps not quite as consistent as they should be.
I also think that your observations violate what perlport.pod has to
say. For example here:
A common misconception in socket programming is that "\n" eq "\012"
everywhere. When using protocols such as common Internet protocols,
"\012" and "\015" are called for specifically, and the values of the
logical "\n" and "\r" (carriage return) are not reliable.
print SOCKET "Hi there, client!\r\n"; # WRONG
print SOCKET "Hi there, client!\015\012"; # RIGHT
So both would result in "0D 0D 0A", no? Anyway, I don't know. I'll be
very happy if I don't have to deal with such things too often.
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: Wed, 07 May 2003 04:41:48 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: How do you create a biniary file in Perl.
Message-Id: <Xns937439E64A313sdn.comcast@216.166.71.239>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
"Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> wrote in
news:b9aegf$nh$1@nets3.rz.RWTH-Aachen.DE:
> Also sprach Mihai N.:
>
>>> binmode F;
>>> print F "\n";
>>>
>>> # or without binmode
>>> print F "\012";
>>>
>>> "\n" is a logical newline that gets translated into the
respective
>>> presentation of the underlying operating system. Such a
translation
>>> does not happen for "\012".
>
>> Warning!
>> I just tested it on Windows and if you don't use binmode the
result for
>> both "\n" and "\012" is 0D 0A.
>
> Hmmh, nasty. So I was wrong and Xavier's and Josef's posting
suggest
> that things are perhaps not quite as consistent as they should be.
> I also think that your observations violate what perlport.pod has
to
> say. For example here:
>
> A common misconception in socket programming is that "\n" eq
"\012"
> everywhere. When using protocols such as common Internet
protocols,
> "\012" and "\015" are called for specifically, and the values
of the
> logical "\n" and "\r" (carriage return) are not reliable.
>
> print SOCKET "Hi there, client!\r\n"; # WRONG
> print SOCKET "Hi there, client!\015\012"; # RIGHT
>
> So both would result in "0D 0D 0A", no? Anyway, I don't know. I'll
be
> very happy if I don't have to deal with such things too often.
How can perl possibly tell the difference?
my $nl1 = "\012";
my $nl2 = "\n";
print A "whee! $nl1";
print A "woo-hoo! $nl2";
binmode B;
print B "whee! $nl1";
print B "woo-hoo!" $nl2";
(and I agree with you: I'm glad I don't have to deal with OSs that
have this problem).
- --
Eric
print scalar reverse sort qw p ekca lre reh
ts uJ p, $/.r, map $_.$", qw e p h tona e;
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32) - WinPT 0.5.13
iD8DBQE+uNS5Y96i4h5M0egRAtbRAJ9a0DFGrTIhuZ0NDknjsKCCqPEVfgCg9Ow9
9TSF93bS+6wwb+JakP2uxn8=
=zTzJ
-----END PGP SIGNATURE-----
------------------------------
Date: Wed, 07 May 2003 09:45:55 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: How do you create a biniary file in Perl.
Message-Id: <b6lhbvs6js3aj3gvck9lto3sjln3oaieqt@4ax.com>
Anthony wrote:
>I have little information on the subject in the two texts I have.
It's the same as for text files. All you have to do is use binmode() on
your output file handle, and the file contents will be *Exactly* what
you print to it.
In order to construct the binary data, the function pack() is helpful.
There's a tutorial included with recent perls, "perlpacktut". You can
find a copy on the web on perldoc.com:
<http://www.perldoc.com/perl5.8.0/pod/perlpacktut.html>
--
Bart.
------------------------------
Date: 6 May 2003 21:22:47 -0700
From: IneverReadAnythingSentToMe@hotmail.com (David Filmer)
Subject: Re: In search of elegant code - parameter in grep?
Message-Id: <e4c916dd.0305062022.35d6fbef@posting.google.com>
You guys are great - Thanks! Looking at Tassilo's solution, I now
understand the advise about creating the temp variable to avoid
re-evaluation. But my list is small and usage is light; I think I'll
stick with the suggested syntax and skip the temp variable (temp
variables annoy me, even when they're more efficient, but if I were
iterating often or over a large list, I would acquiesce).
Thanks again!
------------------------------
Date: Wed, 07 May 2003 09:08:19 +0200
From: Malte Ubl <ubl@schaffhausen.de>
Subject: Re: Including files in Perl
Message-Id: <b9aei0$mtb$1@news.dtag.de>
James E Keenan wrote:
> "Malte Ubl" <ubl@schaffhausen.de> wrote in message
> news:b97ulv$nep$1@news.dtag.de...
>
>>James E Keenan wrote:
>>
>>
>>> $SERVER = 'foo';
>>>
>>>Hence, no 'our' in the included file ... only in the script.
>>
>>Why not? It makes the required file strict safe.
>>
>
> Why should we worry whether the required file is strict-safe or not? The
All Perl code should be strict safe.
> required file is merely a file holding some text that, while it looks like
> code for Perl variables, only _really_ becomes code for Perl variables once
> the file is required into a real Perl script.
That's wrong. A required file represents a lexical scope of its own. In
the context of being required it is a Perl file.
> As I noted in another posting in this thread, to call the required file
> 'require.pl' is arbitrary. In fact, it's more than arbitrary, it's
> misleading. Better to call it 'require.txt' or 'require.conf'.
Wrong again. The extension never matters, for perl that is. Your editor
might have a different opinion.
> Consider this: Suppose that we altered the main package by commenting out
> the declaration of $SERVER with 'our'. Suppose we put an 'our' in front of
> $SERVER in the required file. Does the main package compile? No.
That's because C<our> lexically declares the legality of using an
unqualified package global in strict mode.
malte
------------------------------
Date: 07 May 2003 04:20:43 GMT
From: David Scarlett <look@my.signature>
Subject: Re: Locking and updating files...
Message-Id: <Xns937491F96B843dscarlett@210.49.20.254>
Chris Dutton <chris@cmb-enterprises.com> wrote in news:chris-
B62539.23231206052003@corp.supernews.com :
> Or you could open the file for both reading and writing. If memory
> serves, it's something like:
>
> open(FH, "+<some_file.txt");
But then how do you delete lines? Read N lines ahead of where you're
writing to? (Where N is the number of lines you've skipped.)
--
David Scarlett
dscarlett@_ _ _ _ _ _ _ _
_ _ _ _ _ optusnet.com.au
------------------------------
Date: 7 May 2003 09:51:13 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Locking and updating files...
Message-Id: <b9akuh$16g$2@mamenchi.zrz.TU-Berlin.DE>
David Scarlett <look@my.signature> wrote in comp.lang.perl.misc:
> Chris Dutton <chris@cmb-enterprises.com> wrote in news:chris-
> B62539.23231206052003@corp.supernews.com :
>
> > Or you could open the file for both reading and writing. If memory
> > serves, it's something like:
> >
> > open(FH, "+<some_file.txt");
>
> But then how do you delete lines? Read N lines ahead of where you're
> writing to? (Where N is the number of lines you've skipped.)
You don't delete lines from a file directly (except for lines at
the end of the file). Modifications of a file that don't happen
at the end *always* imply rewriting the file.
Anno
------------------------------
Date: Wed, 7 May 2003 05:01:28 +0000 (UTC)
From: hudson@swcp.com (Tramm Hudson)
Subject: Re: Open With?
Message-Id: <b9a3v8$rpq$1@iruka.swcp.com>
Eric Schwartz <emschwar@pobox.com> wrote (in part):
> [...] Database
> programming is easy; database design is very hard. I can't remember
> offhand who it was (Dijkstra? Knuth?), but someone very seminal in
> computer science said, "Show me your data structures, and I'll show
> you your code". This is doubly (trebly?) true for databases.
Typically attributed to Fredrick Brooks in _The Mythical Man Month_,
chapter nine:
# Show me your flowcharts and conceal your tables, and I shall continue
# to be mystified. Show me your tables and I won't usually need your
# flowcharts; it will be obvious.
Substitute source code for flowcharts and data structures for tables to
bring the quote into the 21st century. _The Cathedral and the Bazaar_
quoted Brooks with that exact substitution.
Trammell
--
-----|----- hudson@osresearch.net W 240-283-1700
*>=====[]L\ hudson@rotomotion.com M 505-463-1896
' -'-`- http://www.swcp.com/~hudson/ KC5RNF
------------------------------
Date: Wed, 07 May 2003 05:16:46 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Open With?
Message-Id: <x77k93pc8y.fsf@mail.sysarch.com>
>>>>> "TH" == Tramm Hudson <hudson@swcp.com> writes:
TH> Eric Schwartz <emschwar@pobox.com> wrote (in part):
>> [...] Database
>> programming is easy; database design is very hard. I can't remember
>> offhand who it was (Dijkstra? Knuth?), but someone very seminal in
>> computer science said, "Show me your data structures, and I'll show
>> you your code". This is doubly (trebly?) true for databases.
TH> Typically attributed to Fredrick Brooks in _The Mythical Man Month_,
TH> chapter nine:
TH> # Show me your flowcharts and conceal your tables, and I shall continue
TH> # to be mystified. Show me your tables and I won't usually need your
TH> # flowcharts; it will be obvious.
TH> Substitute source code for flowcharts and data structures for tables to
TH> bring the quote into the 21st century. _The Cathedral and the Bazaar_
TH> quoted Brooks with that exact substitution.
both are somewhat bogus. you can have plenty of structure info but how
you connect and traverse them will not be obvious from the data. imagine
a single node structure than can be used in lists, queues, trees and
graphs. knowing it without knowing how they should be connected is
useless. even knowing large examples of them isn't enough if you don't
show every possible case. there has to be code logic to deal with all of
the variations and such.
sorry, good concept and saying but it fails in the real world.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Wed, 07 May 2003 09:12:52 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: Open With?
Message-Id: <3eb8ccac.2312123858@news.cis.dfn.de>
On Tue, 6 May 2003 21:13:01 -0400, "Tariq"
<taariqq@yahoo.com> wrote:
>> > are talked about as the necessary tools. Since
>> > PHP is famous for server side scripting with MySQL, I thought if I could
>> > eliminate CGI from the mix, that would be one less technology to learn
PHP is basically a simplified subset of Perl, with a
CGI module and DBI module built in. It is used
only for Web programming. Perl is a general purpose
language and can be used to solve any programming
problem, although it may not be suitable for all.
Perl programmers do most of their work
with modules, plug in libraries that export
functions and objects and extend the language.
An especially useful set of modules for Bioinformatics
work is Bioperl. See http://www.bioperl.org/
for details, but not until you have a basic understanding
of Perl itself.
--
Regards, Helgi Briem
helgi DOT briem AT decode DOT is
------------------------------
Date: Wed, 07 May 2003 08:36:02 +0100
From: Simon Andrews <simon.andrews@bbsrc.ac.uk>
Subject: Re: perl compiler for win32 platform?
Message-Id: <3EB8B762.9020804@bbsrc.ac.uk>
Simon Andrews wrote:
>
> I don't have a quick answer to this one. I'll post your last message to
> the PAR users list and see if they have any suggestions.
OK, quick summary from the PAR list is that they aren't exactly sure
what's going on either! Their best guess is that you have MSVC++
installed (Yes?), and that both nmake and cl are in your path (Yes?),
but not the various library files you need to compile PAR from source.
In this scenario the Makefile will not download the precompiled version
of the executable because it detects a local compiler, but when it tries
to use the compiler it fails because it doesn't know the path to the
libraries.
There are two potential fixes to this:
1) If you want to compile PAR yourself using your local compiler then
run the vcvars32.bat file which comes with the PAR distribution before
doing perl Makefile.PL etc. This should find all the appropriate
library paths for your local compiler and things should proceed from there.
2) If you want to use a precompiled version from CPAN then copy
nmake.exe to your build directory (the one with Makefile.PL in it),
DON'T run the vsvars32.bat file, then run perl Makefile.PL etc. Your
compiler won't be found, and the install should use the precompiled
version. You will need to have an active internet connection during the
install for this to work.
If you're still having problems I suggest you post them directly to the
PAR mailing list (par@perl.org). You can subscribe to the list by
sending a blank message to par-subscribe@perl.org. That way you can get
direct advice from the people who really know what they're talking about
with this module, and not just messages passed on by me :-).
Hope this helps
Simon.
------------------------------
Date: Wed, 07 May 2003 09:49:03 +0100
From: Simon Oliver <simon.oliver@nospam.umist.ac.uk>
Subject: RegExp Puzzle
Message-Id: <3EB8C87F.3080103@nospam.umist.ac.uk>
I know this should be simple but I can't figure it out.
I want to replace all occurrence of the percent symbol in a string with
another string. But if the percent symbol is escaped with a backslash I
want to ignore it. Supposing I want to replace each '%' with '!':
foo%bar => foo!bar
foo\%bar => foo%bar
foo%%bar => foo!!bar
foo\%%bar => foo%!bar
I suppose backslashes will need an escape too.
foo\bar => foobar
foo\\bar => foo\bar
foo\%bar => foo%bar
foo\\%bar => foo\!bar
foo\\\%bar => foo\%bar
--
Simon Oliver
------------------------------
Date: Wed, 07 May 2003 11:30:53 +0200
From: Thomas Haselberger <thomas.haselberger@ucpmorgen.com>
Subject: Re: RegExp Puzzle
Message-Id: <uk7d33xyq.fsf@ucpmorgen.com>
Simon Oliver <simon.oliver@nospam.umist.ac.uk> writes:
> I know this should be simple but I can't figure it out.
>
> I want to replace all occurrence of the percent symbol in a string
> with another string. But if the percent symbol is escaped with a
> backslash I want to ignore it. Supposing I want to replace each '%'
> with '!':
this should do what you need
$a = 'agsa\%%dfdsa';
#$a = 'agsa%dfdsa';
$a =~ s/([^\\])%/\1!/g;
print $a,"\n";
------------------------------
Date: Wed, 7 May 2003 12:32:05 +0530
From: "Kasp" <kasp@epatra.com>
Subject: Re: removing last char of string
Message-Id: <b9ab41$g36$1@newsreader.mailgate.org>
> Is there a way in perl to remove the last character of a string?
use chop.
But be careful about what you chop.
--
"Accept that some days you are the pigeon and some days the statue."
"A pat on the back is only a few inches from a kick in the butt." - Dilbert.
------------------------------
Date: 7 May 2003 08:04:03 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: removing last char of string
Message-Id: <b9aelj$ro$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Kasp:
>> Is there a way in perl to remove the last character of a string?
>
> use chop.
> But be careful about what you chop.
Yeah, you shouldn't chop human extremities...at least not carelessly. ;-)
SCNR,
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: Wed, 07 May 2003 04:40:47 GMT
From: "Danny Aldham" <danny@lennon.postino.com>
Subject: Sendmail::Milter fails under load
Message-Id: <j70ua.133504$ja.5023383@news2.calgary.shaw.ca>
I have written a simple script using the sample.pl that comes with
Sendmail::Milter as a template. Seems to work fine, but when sendmail is
loaded up ie.recieving more than 1 message at a time, the sendmail process
is getting errors generated by connecting to the perl script/socket like:
Reject 451 4.7.1 Please try again later.
My guess is that I need a milter that forks on connect_callback after the
socket connects but am not clear on exactly how to do that. Or I need to
multithread the program, which may be way over my head. The man page does
not suggest that a fork is necessary, so I may be way off base. Hoping I am
not the first person to see just this problem.
Danny Aldham
------------------------------
Date: 6 May 2003 21:53:14 -0700
From: npengr@yahoo.com (Prashanth)
Subject: Re: shipping perl
Message-Id: <fff5a729.0305062053.46ae1442@posting.google.com>
> I have some doubts. Why would anyone buy from a vendor that doesn't
> test its own software, but just asks on Usenet whether what they'll
> ship will work?
Thanks for your comments, group. We have tested it under all possible
conditions and our test cases pass. I just wanted to make sure by
asking you people. I'll try out perl2exe also.
-Prashanth.
------------------------------
Date: 7 May 2003 05:31:10 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: What is this nntp.perl.org thing; seems nifty
Message-Id: <b9a5mu$kle$1@nets3.rz.RWTH-Aachen.DE>
Also sprach David Combs:
> I saw nntp.perl.org mentioned in an article here,
> so went over to it.
>
> The page there has a title-like heading "newsgroups";
> rather, it looks like a bunch of email lists.
Well, initially those were indeed mailing-lists. nntp.perl.org is a
newsserver that acts as a gateway to these mailinglists. Any mail to the
list appears as newsgroup posting on this server. Posting into the
newsgroup will make the post appear as mail on the mailing-list.
> Questions:
>
> . what is this nntp.<some-word>.org? Are there others
> besides perl's?
No. nntp.perl.org is the address of the newsserver.
> . How does it work? The choosing of a list to read,
> and it's then "reading the list", displaying the
> chosen messages, etc?
Ideally you have your newsreader configured to use this newsserver and
then subscribe to some of the groups (mailing-lists) there. This server
should give you a list of available lists if you request it.
perl-xs@perl.org for instance is the address of the mailing-list. On
nntp.perl.org the group name is perl.xs.
> . Is it a perl program? Or is this elist-reading
> system some generic capability on the internet,
> written in eg c, c++, python, etc -- ie, not
> necessarily perl?
Since news.nntp.org is a newsserver, it is probably running some
software in C. ;-) INN is a newsserver and comes to mind.
> . I just happenee to see it mentioned in an article,
> this nntp.perl.org. Where would one look to discover
> that it exists? In some existing perl documentation?
>
> . Anything else to say about it?
>
> . It would be nice if, like google groups, you could
> a whole series of articles "printed out together" into
> one file, to be looked at off-line. or cut and pasted
> at one's leisure, etc.
You must be talking about the web-interface here. You'll be better off
using your favorite newsclient to handle the groups. Thus you can also
get a local offline copy of all postings made to a list.
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: 07 May 2003 02:28:58 -0700
From: Matt M <6e777a6d617474@6e65747363617065.6e6574>
Subject: Write both fd0 and fd1
Message-Id: <el3b2jhh.fsf@6e65747363617065.6e6574>
Hi Gurus,
I need some help understanding some things. I'm trying to figure out
how to pipe output to an external program on both STDIN and STDOUT
(fd0 and fd1). I've read the docs for pipe(), fork(), open(), IO::File,
and IO::Pipe but I just can't get a grasp on this. The program is
qmail-queue which (from it's man page), "..reads a mail message from
descriptor 0. It then reads envelope information from descriptor 1".
How do I do this? Please help!
TIA
--
Matt M.
---------
| nwzmatt |
---------
| @ |
----------
| netscape |
----------
| . |
-----
| net |
-----
------------------------------
Date: Wed, 07 May 2003 09:55:01 GMT
From: "Herb Martin" <News@LearnQuick.Com>
Subject: Re: Write both fd0 and fd1
Message-Id: <VJ4ua.46859$8e7.1980904@twister.austin.rr.com>
> I need some help understanding some things. I'm trying to figure out
> how to pipe output to an external program on both STDIN and STDOUT
> (fd0 and fd1). I've read the docs for pipe(), fork(), open(), IO::File,
> and IO::Pipe but I just can't get a grasp on this. The program is
Maybe I am missing something...but that doesn't even
make sense.
STDIN is where your program (normally) reads.
STDOUT is where you (normally) write.
If you write to STDOUT, then you can pipe that to
other programs on STDIN.
It is useful sometimes to re-direct STDERR to stdout
so that both go to a file OR to be able to T, stdout to
more than one place.
But writing to your input doesn't make much sense.
Herb Martin
Try ADDS for great Weather too:
http://adds.aviationweather.noaa.gov/projects/adds
------------------------------
Date: 7 May 2003 09:55:02 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Write both fd0 and fd1
Message-Id: <b9al5m$16g$3@mamenchi.zrz.TU-Berlin.DE>
Matt M <6e777a6d617474@6e65747363617065.6e6574> wrote in comp.lang.perl.misc:
>
> Hi Gurus,
>
> I need some help understanding some things. I'm trying to figure out
> how to pipe output to an external program on both STDIN and STDOUT
> (fd0 and fd1). I've read the docs for pipe(), fork(), open(), IO::File,
> and IO::Pipe but I just can't get a grasp on this. The program is
> qmail-queue which (from it's man page), "..reads a mail message from
> descriptor 0. It then reads envelope information from descriptor 1".
>
> How do I do this? Please help!
Use the module IPC::Open2...
>
> TIA
> --
>
> Matt M.
>
> ---------
> | nwzmatt |
> ---------
> | @ |
> ----------
> | netscape |
> ----------
> | . |
> -----
> | net |
> -----
...and consider shortening your sig. Four lines are the conventional
limit.
Anno
------------------------------
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.
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 4951
***************************************