[28892] in Perl-Users-Digest
Perl-Users Digest, Issue: 136 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 14 14:10:27 2007
Date: Wed, 14 Feb 2007 11:09:08 -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 Wed, 14 Feb 2007 Volume: 11 Number: 136
Today's topics:
Become more productive with Vista Speech Recognition. <zentara@highstream.net>
Re: Become more productive with Vista Speech Recognitio <someone@example.com>
Re: Bind 9 administration module(s) <noreply@gunnar.cc>
Re: find lines in a file <jesse_hardy@premierinc.com>
Re: find lines in a file <mritty@gmail.com>
Re: find lines in a file <jesse_hardy@premierinc.com>
Re: Lazy evaluation? <someone@example.com>
Re: Lazy evaluation? <bik.mido@tiscalinet.it>
Re: Lazy evaluation? <wahab-mail@gmx.de>
Re: Lazy evaluation? <someone@example.com>
Re: Lazy evaluation? <bugbear@trim_papermule.co.uk_trim>
Re: Lazy evaluation? <uri@stemsystems.com>
Re: Lazy evaluation? xhoster@gmail.com
problem CGI <john.swilting@wanadoo.fr>
Re: problem CGI <bik.mido@tiscalinet.it>
Re: problem CGI <john.swilting@wanadoo.fr>
Re: problem CGI <john.swilting@wanadoo.fr>
Re: problem CGI <nobull67@gmail.com>
Re: problem CGI <john.swilting@wanadoo.fr>
Re: problem CGI <john.swilting@wanadoo.fr>
Re: problem CGI <john.swilting@wanadoo.fr>
The future! I can see the future! Nay, I can hear it! <bik.mido@tiscalinet.it>
Re: waitpid woes on Solaris, Perl 5.8.8 <ad_101@yahoo.com>
Re: waitpid woes on Solaris, Perl 5.8.8 xhoster@gmail.com
Re: works now ! was: bypass shell - pipe into child pid <zen13097@zen.co.uk>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 14 Feb 2007 13:48:17 GMT
From: zentara <zentara@highstream.net>
Subject: Become more productive with Vista Speech Recognition.
Message-Id: <ai46t25u0eablo05ejom8hlvgqq0c8cvfa@4ax.com>
After viewing this video, I'm sure you will be running to
get your copy of Vista. :-)
http://www.youtube.com/watch?v=KyLqUf4cdwc
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
------------------------------
Date: Wed, 14 Feb 2007 13:50:25 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Become more productive with Vista Speech Recognition.
Message-Id: <BsEAh.79644$Oa.11185@edtnps82>
zentara wrote:
> After viewing this video, I'm sure you will be running to
> get your copy of Vista. :-)
NOT!! ;-)
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
------------------------------
Date: Wed, 14 Feb 2007 11:40:24 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Bind 9 administration module(s)
Message-Id: <53g750F1ssgo7U2@mid.individual.net>
Dan.Rode@gmail.com wrote:
> Many years ago I wrote a simple perl wrapper for bind 4.x. Now I need
> to develop a set of scripts to front-end most DNS administration
> tasks.
Check out www.webmin.com
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 14 Feb 2007 07:20:51 -0800
From: "jesse" <jesse_hardy@premierinc.com>
Subject: Re: find lines in a file
Message-Id: <1171466451.272337.5350@h3g2000cwc.googlegroups.com>
On Feb 6, 3:22 pm, "Paul Lalli" <mri...@gmail.com> wrote:
> On Feb 6, 2:56 pm, jesse_ha...@premierinc.com wrote:
>
> > I have log files that I want to parse through every day and search for
> > failures and errors. I understand how to open the file and search for
> > failures and errors but I may have several lines that have the same
> > error. What I want to do is print the first occurence to a file and
> > count each occurence after the first and print that to the same file.
> > So if I had 50 lines with the same error I wanted to print the first
> > error to a file and say there were 49 more occurences of that error.
>
> So what have you tried so far, and where did it go wrong?
>
> I would use a hash to keep track of the errors and how many more there
> are
> [untested]
> my %count_of;
> while (<DATA>) {
> if (/Error: (.*)/) {
> $count_of{$1}++;
> }}
>
> for my $error (keys %count_of) {
> print "There were $count_of{$error} instances of $error\n";
>
> }
>
> If that's not what you're looking for, please post a short-but-
> complete script that demonstrates your problem, along with sample
> input and desired output.
>
> (Have you read the Posting Guidelines that are posted here twice a
> week?)
>
> Paul Lalli
Paul, I have a question. The (.*) is supposed to capture everything
after the match right? So if I didn't want to capture everything
after the match could this be changed some how to just grab the next
35 characters after the match or before the match?
------------------------------
Date: 14 Feb 2007 07:37:13 -0800
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: find lines in a file
Message-Id: <1171467433.124520.237160@v33g2000cwv.googlegroups.com>
On Feb 14, 10:20 am, "jesse" <jesse_ha...@premierinc.com> wrote:
> On Feb 6, 3:22 pm, "Paul Lalli" <mri...@gmail.com> wrote:
> > while (<DATA>) {
> > if (/Error: (.*)/) {
> > $count_of{$1}++;
> > }}
> Paul, I have a question. The (.*) is supposed to capture everything
> after the match right? So if I didn't want to capture everything
> after the match could this be changed some how to just grab the next
> 35 characters after the match or before the match?
Sure it could.
if (/Error: (.{35})/) {
or
if (/(.{35}) Error:/) {
Please read up on regular expressions:
perldoc perlre
perldoc perlretut
perldoc perlreref
Paul Lalli
------------------------------
Date: 14 Feb 2007 08:17:36 -0800
From: "jesse" <jesse_hardy@premierinc.com>
Subject: Re: find lines in a file
Message-Id: <1171469856.481157.187560@q2g2000cwa.googlegroups.com>
On Feb 14, 10:37 am, "Paul Lalli" <mri...@gmail.com> wrote:
> On Feb 14, 10:20 am, "jesse" <jesse_ha...@premierinc.com> wrote:
>
> > On Feb 6, 3:22 pm, "Paul Lalli" <mri...@gmail.com> wrote:
> > > while (<DATA>) {
> > > if (/Error: (.*)/) {
> > > $count_of{$1}++;
> > > }}
> > Paul, I have a question. The (.*) is supposed to capture everything
> > after thematchright? So if I didn't want to capture everything
> > after thematchcould this be changed some how to just grab the next
> > 35charactersafter thematchorbeforethematch?
>
> Sure it could.
>
> if (/Error: (.{35})/) {
>
> or
>
> if (/(.{35}) Error:/) {
>
> Please read up on regular expressions:
> perldoc perlre
> perldoc perlretut
> perldoc perlreref
>
> Paul Lalli
Perfect Paul! Thanks for your help, and I will read those perldocs.
------------------------------
Date: Wed, 14 Feb 2007 08:31:15 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Lazy evaluation?
Message-Id: <nNzAh.73739$Oa.64359@edtnps82>
Rob Hoelz wrote:
>
> does Perl use lazy evaluation?
AFAIK no it does not.
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
------------------------------
Date: Wed, 14 Feb 2007 11:15:17 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Lazy evaluation?
Message-Id: <v3o5t29slv6qu5gqvl2raujbujl938dduh@4ax.com>
On Tue, 13 Feb 2007 20:14:13 -0600, Rob Hoelz <hoelz@wisc.edu> wrote:
>In a statement like this:
>
>local $\ = "\n";
>foreach $num (1..1000_000_000) {
> print $num;
>}
I seem to remember that this particular one is optimized, but I'm not
really sure if up to the point of lazy evaluation.
>local $\ = "\n";
>foreach $line (<$handle>) {
> chomp $line;
> print $line;
>}
Most certainly not. That's why we recommend all the time to use
C<while> instead.
I guess you will have to wait for Perl 6. More or less everything is
lazy by default there...
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: Wed, 14 Feb 2007 12:01:59 +0100
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: Lazy evaluation?
Message-Id: <equqh6$le$1@mlucom4.urz.uni-halle.de>
Michele Dondi wrote:
> On Tue, 13 Feb 2007 20:14:13 -0600, Rob Hoelz <hoelz@wisc.edu> wrote:
>> local $\ = "\n";
>> foreach $num (1..1000_000_000) {
>> print $num;
>> }
>
> I seem to remember that this particular one is optimized, but I'm not
> really sure if up to the point of lazy evaluation.
The above (foreach list) *is* lazy evaluated (at least
in my in 5.8.8/Linux), whereas the list in
print map { exit } (1..1000_000_000);
is not (panic: realloc at lazy.pl al line ##).
Regards
Mirco
------------------------------
Date: Wed, 14 Feb 2007 13:59:33 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Lazy evaluation?
Message-Id: <9BEAh.75762$Y6.52973@edtnps89>
Mirco Wahab wrote:
> Michele Dondi wrote:
>> On Tue, 13 Feb 2007 20:14:13 -0600, Rob Hoelz <hoelz@wisc.edu> wrote:
>>> local $\ = "\n";
>>> foreach $num (1..1000_000_000) {
>>> print $num;
>>> }
>>
>> I seem to remember that this particular one is optimized, but I'm not
>> really sure if up to the point of lazy evaluation.
>
> The above (foreach list) *is* lazy evaluated (at least
> in my in 5.8.8/Linux), whereas the list in
That is not lazy evaluation. Perl is just internally evaluating:
foreach $num (1..1000_000_000) {
print $num;
}
As:
for ( $num = 1; $num <= 1000_000_000; ++$num ) {
print $num;
}
Lazy evaluation would imply that the assignment to $num is delayed until it is
actually required for the print() function which is not what perl does.
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
------------------------------
Date: Wed, 14 Feb 2007 14:37:05 +0000
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: Lazy evaluation?
Message-Id: <45d31e92$0$8753$ed2619ec@ptn-nntp-reader02.plus.net>
John W. Krahn wrote:
> That is not lazy evaluation. Perl is just internally evaluating:
>
> foreach $num (1..1000_000_000) {
> print $num;
> }
>
> As:
>
> for ( $num = 1; $num <= 1000_000_000; ++$num ) {
> print $num;
> }
You mean the entire construct is recognised and
handled as a complete "idiom", as opposed
to a more general evaluation model of ".." ?
BugBear
------------------------------
Date: Wed, 14 Feb 2007 11:24:46 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Lazy evaluation?
Message-Id: <x73b58pv01.fsf@mail.sysarch.com>
>>>>> "b" == bugbear <bugbear@trim_papermule.co.uk_trim> writes:
b> John W. Krahn wrote:
>> That is not lazy evaluation. Perl is just internally evaluating:
>> foreach $num (1..1000_000_000) {
>> print $num;
>> }
>> As:
>> for ( $num = 1; $num <= 1000_000_000; ++$num ) {
>> print $num;
>> }
b> You mean the entire construct is recognised and
b> handled as a complete "idiom", as opposed
b> to a more general evaluation model of ".." ?
it is easy to optimize (or make pseudo lazy) a .. in a for loop. all you
have to do is change how that is code generated for that special (and
common) case. passing a large .. to map is a very different story as map
expects a full list it can use. it would require more complex
recognition of a .. (and nothing else) being passed to map and a
different version of map that will do internal iteration of the .. vs
iterating over its standard input list. so they didn't try to optimize
.. in the general case as it would need work on every list consuming
operator or function. and as someone said real lazy eval is the norm (in
all cases!) in p6.
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: 14 Feb 2007 17:05:11 GMT
From: xhoster@gmail.com
Subject: Re: Lazy evaluation?
Message-Id: <20070214120609.342$xu@newsreader.com>
Rob Hoelz <hoelz@wisc.edu> wrote:
> In a statement like this:
>
> local $\ = "\n";
> foreach $num (1..1000_000_000) {
> print $num;
> }
>
> or this:
>
> local $\ = "\n";
> foreach $line (<$handle>) {
> chomp $line;
> print $line;
> }
>
> does Perl use lazy evaluation? Thanks!
First one yes, second one no. (For the second, use while instead)
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Wed, 14 Feb 2007 12:52:14 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: problem CGI
Message-Id: <45d2f7e2$0$27401$ba4acef3@news.orange.fr>
I have a problem
how to recover the data of a form
the form is a large table with images and buttons to order
------------------------------
Date: Wed, 14 Feb 2007 13:32:04 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: problem CGI
Message-Id: <g906t29htnh788ji3coin2fdb37p0dgmqr@4ax.com>
On Wed, 14 Feb 2007 12:52:14 +0100, "john.swilting"
<john.swilting@wanadoo.fr> wrote:
>I have a problem
>how to recover the data of a form
perldoc CGI
>the form is a large table with images and buttons to order
Is that relevant?
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: Wed, 14 Feb 2007 13:34:51 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem CGI
Message-Id: <45d301df$0$27375$ba4acef3@news.orange.fr>
john.swilting wrote:
> I have a problem
> how to recover the data of a form
> the form is a large table with images and buttons to order
<form action="http://localhost/cgi-bin/vente.cgi" method="post">
<table>
<tbody>
<tr>
<td> <img src="img168_2.GIF" width="200" height="176" border="0"
alt=""><hr><i>image numero 1 prix 39.99euros</i></hr><hr /><input name="1"
type="image"
src="../commander.gif"/> <a
href="img168_2.GIF">agrandir</a></td></td>
<td> <img src="img168_2.GIF" width="200" height="176" border="0"
alt=""><hr><i>image numero 2 prix 39.99euros</i></hr><hr /><input name="2"
type="image"
src="../commander.gif"/> <a
href="img168_2.GIF">agrandir</a></td></td>
<td> </td>
<td> </td>
<td> </td>
------------------------------
Date: Wed, 14 Feb 2007 13:36:51 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem CGI
Message-Id: <45d30257$0$27375$ba4acef3@news.orange.fr>
Michele Dondi wrote:
> On Wed, 14 Feb 2007 12:52:14 +0100, "john.swilting"
> <john.swilting@wanadoo.fr> wrote:
>
>>I have a problem
>>how to recover the data of a form
>
> perldoc CGI
>
>>the form is a large table with images and buttons to order
>
> Is that relevant?
>
>
> Michele
you cannot help me too a little more perldoc cgi me
------------------------------
Date: 14 Feb 2007 05:26:40 -0800
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: problem CGI
Message-Id: <1171459600.617271.245010@s48g2000cws.googlegroups.com>
On Feb 14, 12:34 pm, "john.swilting" <john.swilt...@wanadoo.fr> wrote:
> john.swilting wrote:
> > I have a problem
> > how to recover the data of a form
> > the form is a large table with images and buttons to order
<input name="1" type="image" src="../commander.gif"/>
A description of what the client should send when the user hits a
graphical submit button can be found here:
http://www.w3.org/TR/html4/interact/forms.html#h-17.4.1
It is unclear what problem you are experiencing.
Note that only one submit button at a time can ever be "successful".
http://www.w3.org/TR/html4/interact/forms.html#h-17.13.2
Try to write Perl to show us the problem.
If you can't do that try your best to explain in English.
If necessary you can give more detail in your native language - this
is an international group someone will probably translate it.
------------------------------
Date: Wed, 14 Feb 2007 14:48:34 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem CGI
Message-Id: <45d31326$0$27379$ba4acef3@news.orange.fr>
Brian McCauley wrote:
> A description of what the client should send when the user hits a
> graphical submit button can be found here:
I am afraid to find me with much
my $1 = $cgi->param('1');
------------------------------
Date: Wed, 14 Feb 2007 15:22:39 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem CGI
Message-Id: <45d31b23$0$5100$ba4acef3@news.orange.fr>
john.swilting wrote:
> Brian McCauley wrote:
>
>> A description of what the client should send when the user hits a
>> graphical submit button can be found here:
>
> I am afraid to find me with much
> my $1 = $cgi->param('1');
that will be a gas works
:)
------------------------------
Date: Wed, 14 Feb 2007 15:41:21 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem CGI
Message-Id: <45d31f85$0$27406$ba4acef3@news.orange.fr>
john.swilting wrote:
> john.swilting wrote:
>
>> Brian McCauley wrote:
>>
>>> A description of what the client should send when the user hits a
>>> graphical submit button can be found here:
>>
>> I am afraid to find me with much
>> my $1 = $cgi->param('1');
> that will be a gas works
>
> :)
:-[
------------------------------
Date: Wed, 14 Feb 2007 11:18:03 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: The future! I can see the future! Nay, I can hear it!
Message-Id: <hco5t2h5k3oflvams9467nv1bb5vpof63e@4ax.com>
http://www.youtube.com/watch?v=KyLqUf4cdwc
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: 14 Feb 2007 08:12:16 -0800
From: "A" <ad_101@yahoo.com>
Subject: Re: waitpid woes on Solaris, Perl 5.8.8
Message-Id: <1171469536.666321.8560@v33g2000cwv.googlegroups.com>
On Feb 13, 3:44 pm, xhos...@gmail.com wrote:
>
> You are mucking with $SIG{CLD} when, as far as I can tell, you have
> no need to. getChildStatus (and the waitpid in it) can get called twice,
> once from the sig handler and once from the runIt. If it does get called
> twice, the second time that child no longer exists, as it was already
> waited on. Remove the $SIG{CLD} stuff.
>
> Xho
>
> - Show quoted text -
Thanks for your reply.
First, there's a typo in my original message.
The third line after the while(1) in getChildStatus should be
$tm = $!;
instead of
$em = $!;
Now, to the point that the waitpid could get called twice.
Please note that the code is designed to guard against this, the
assignments to the globals $ec and $em are done if and only if waitpid
returns the matching pid.
So, even if it is called twice, the second time waitpid returns -1,
and then
getChildStatus returns without modifying the globals.
On your advice to remove the $SIG{CLD}, there are 3 statements,
the first statement saves the handler,
the second statement installs the current one needed by this
routine
and the last one re-installs the saved handler.
which one(s) would you suggest I remove?
Yes, there's a deficiency (bug, if you will) in the code. The
$SIG{CLD} should be re-installed if fork fails, but that I think, is
of no consequence to the problem at hand.
Thanks again.
------------------------------
Date: 14 Feb 2007 17:31:31 GMT
From: xhoster@gmail.com
Subject: Re: waitpid woes on Solaris, Perl 5.8.8
Message-Id: <20070214123229.174$BH@newsreader.com>
"A" <ad_101@yahoo.com> wrote:
> On Feb 13, 3:44 pm, xhos...@gmail.com wrote:
> >
> > You are mucking with $SIG{CLD} when, as far as I can tell, you have
> > no need to. getChildStatus (and the waitpid in it) can get called
> > twice, once from the sig handler and once from the runIt. If it does
> > get called twice, the second time that child no longer exists, as it
> > was already waited on. Remove the $SIG{CLD} stuff.
> >
> > Xho
> >
> > - Show quoted text -
>
> Thanks for your reply.
>
> First, there's a typo in my original message.
>
> The third line after the while(1) in getChildStatus should be
> $tm = $!;
> instead of
> $em = $!;
>
> Now, to the point that the waitpid could get called twice.
>
> Please note that the code is designed to guard against this, the
> assignments to the globals $ec and $em are done if and only if waitpid
> returns the matching pid.
The waitpid of one getChildStatus returns the expected pid and sets the
global $? and $!. Before it can do anything else, the waitpid of the other
getChildStatus returns -1 and over writes the global $? and $! with it's
own values, but for this one $r does not meet the if and so returns control
to the first getChildStatus. The first getChildStatus was the right pid
recorded in $r (as that was a lexical and didn't get overwritten), but has
the wrong $? and $! because they did get overwritten, and now those get
recorded into your $tm and $cm
>
> On your advice to remove the $SIG{CLD}, there are 3 statements,
>
> the first statement saves the handler,
> the second statement installs the current one needed by this
> routine
> and the last one re-installs the saved handler.
>
> which one(s) would you suggest I remove?
Probably all of them, but it is not really possible to know from what you
give. We would need to see the code that set the orginal handler that is
getting saved and then restored. If the handler you inherit is necessary,
then why would it be safe to overwrite it with something else for even the
duration of this routine? On the other hand, if the handler you inherit is
not necessary, then what is the point of saving and re-installing it? If
there is no other code which intalls a handler in the first place, then I'd
remove all three of those things. (And even if not, remove at least two,
see below)
> Yes, there's a deficiency (bug, if you will) in the code. The
> $SIG{CLD} should be re-installed if fork fails, but that I think, is
> of no consequence to the problem at hand.
Since you use local to install the handler, I think the old one will be
reinstalled upon fork failure anyway. Saving the old one explicitly and
reinstalling explicit seem to be unnecessary, assuming the local is doing
its job.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 14 Feb 2007 15:21:50 GMT
From: Dave Weaver <zen13097@zen.co.uk>
Subject: Re: works now ! was: bypass shell - pipe into child pid and receive otput
Message-Id: <45d3290e$0$28978$da0feed9@news.zen.co.uk>
On Wed, 14 Feb 2007 00:20:59 +0100, Dr.Ruud <rvtol+news@isolution.nl> wrote:
> Mirco Wahab schreef:
>
> > my $pdf; do { local $/; $pdf = <$chld_out> };
>
> No need for the "do" there,
>
>
> my $pdf; {local $/; $pdf = <$chld_out>};
>
> is sufficient.
>
or:
my $pdf = do { local $/; <$chld_out> };
------------------------------
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 V11 Issue 136
**************************************