[27071] in Perl-Users-Digest
Perl-Users Digest, Issue: 8969 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Feb 18 00:05:46 2006
Date: Fri, 17 Feb 2006 21:05:03 -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 Fri, 17 Feb 2006 Volume: 10 Number: 8969
Today's topics:
Re: Combining three arrays of hashes into one? <FJRussonc@earthlink.net>
Re: Inconsistent returns from piped open <root@localhost.localdomain>
LWP::UserAgent headers <spamnotwanted-use-first-initial-then-last-name@skylightview.com>
Re: PDF:: <samwyse@gmail.com>
Quick sort for Arrays of Hashes? <cmarvel@nethere.com>
Re: Quick sort for Arrays of Hashes? <1usa@llenroc.ude.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 17 Feb 2006 23:37:15 GMT
From: "Frank J. Russo" <FJRussonc@earthlink.net>
Subject: Re: Combining three arrays of hashes into one?
Message-Id: <L6tJf.13089$Nv2.5318@newsread1.news.atl.earthlink.net>
That was unnecessary. Your choice of words / limited vocabular, would make
one not even want to pay attention to you no matter what you have to say.
Words have meaning. Use them properly.
------------------------------
Date: Sat, 18 Feb 2006 02:01:09 +0000 (UTC)
From: Csaba <root@localhost.localdomain>
Subject: Re: Inconsistent returns from piped open
Message-Id: <Xns976E152B7D0BBrs232@81.174.50.80>
xhoster@gmail.com wrote in news:20060216233124.621$mN@newsreader.com:
> fishfry <fishfry@your-mailbox.com> wrote:
>> #!/usr/bin/perl
>> use strict;
>>
>> # 1. The open() call returns false.
>> my $x = open(XX, "| junk");
>> print "x = $x\n";
>
> Perl tries to execute junk. It fails.
>
>> # 2. The open() call returns true.
>> my $y = open(YY, "| junk > foozle");
>> print "y = $y\n";
>
> This contains shell metacharacters, so perl tries to start
> up a shell. It succeeds, and returns the pid of the shell it
> started. The shell turns around and tries to execute junk, and of
> course it fails. But the shell's failure is not perl's failure.
>
[snip]
>>
>> Any explanation for why the second example returns true? And perhaps an
>> alternate way to do the same thing so I can find out if the process
>> creation fails?
>
> You will be notified of this problem via a SIGPIPE or by the close of
> the piped filehandle failing (plus by the shell's whining on STDERR).
> If that isn't sufficient, then I don't know--maybe perldoc perlipc has
> something useful to say on the matter.
>
Maybe that you absolutely, positively have to check the return value of
close() when using open() for IPC.
--
Life is complex, with real and imaginary parts.
------------------------------
Date: Fri, 17 Feb 2006 21:40:27 -0700
From: William Herrera <spamnotwanted-use-first-initial-then-last-name@skylightview.com>
Subject: LWP::UserAgent headers
Message-Id: <f9mdnTzkOsehOGvenZ2dnUVZ_sidnZ2d@adelphia.com>
I am having problems with LWP::UserAgent appearing to add these two
headers to the HTTP::Headers request object:
TE: deflate,gzip;q=0.3
Connection: TE, close
Does anyone know why this might occur? I tried to remove these _before_
sending my request with the remove_header method, but it looks as if
LWP::UserAgent is adding these itself, at request time?
------------------------------
Date: Sat, 18 Feb 2006 01:09:59 GMT
From: Samwyse <samwyse@gmail.com>
Subject: Re: PDF::
Message-Id: <HtuJf.33950$H71.22263@newssvr13.news.prodigy.com>
Steffen Netz wrote:
> Hi Samwyse,
>
> thanks for your answer, but why do you repeat in parts
> my message in your words?
You posted a message in German to a group where everyone speaks English.
I do not speak German, but I undertook to assist you despite that
handicap. I wrote what I believe that you were saying, but I don't know
that my translation is correct, so I gave you (or someone) an
opportunity to correct me.
> Oh ya, I do have debugged the programm so far, as I mentioned in
> my Original message.
I don't speak German, so I had no way of knowing that.
> The number 8506 is an offset to an filehandle.
> But PDF::Core::PDFGetPrimitive expects arguments as references!
> the lines in Question in Core.pm:
>
> $obj = PDFGetPrimitive (filehandle, \$offset);
> sub PDFGetPrimitive (*\$)
This is a prototype. You can read it as two "things" are a concatenated
together. The first thing (the '*') means that the first argument to
PDFGetPrimitive can be any value; the second thing (the '\$') means that
the second argument must be a scalar and Perl will ensure that it is
passed as a reference.
> my @data = PDFGetPrimitive ($self->{"File_Handler"}, $offset);
> my @enddata = PDFGetPrimitive($self->{"File_Handler"}, $offset);
Based on my slight knowlege of prototypes, these are both valid calls to
the routine. I assume that this is your code, so try this just before
the calls:
print "f='", $self->{"File_Handler"}, "', o='", $offset, "'\n";
Report back on what you see. I suspect that the problem is with the
first argument and that you aren't passing a globref as your first argument.
It would also be useful to know exactly what is line 236 of your copy of
the /sw/opensrc/lib/perl5/site_perl/5.8.3/PDF/Core.pm file.
------------------------------
Date: Fri, 17 Feb 2006 18:46:15 -0800
From: Keith Lee <cmarvel@nethere.com>
Subject: Quick sort for Arrays of Hashes?
Message-Id: <pan.2006.02.18.02.46.05.908991@nethere.com>
All:
Does anyone know of a good quick sort program or such that Perl uses with
arrays of hashes? If not, is there a good website to help me learn more
about hashes? Thanks!
Keith
------------------------------
Date: Sat, 18 Feb 2006 02:51:36 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Quick sort for Arrays of Hashes?
Message-Id: <Xns976DDE78A9253asu1cornelledu@127.0.0.1>
Keith Lee <cmarvel@nethere.com> wrote in
news:pan.2006.02.18.02.46.05.908991@nethere.com:
> Does anyone know of a good quick sort program or such that Perl
> uses with arrays of hashes? If not, is there a good website to
> help me learn more about hashes? Thanks!
perldoc -f sort
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
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 8969
***************************************