[25122] in Perl-Users-Digest
Perl-Users Digest, Issue: 7372 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 7 00:10:50 2004
Date: Sat, 6 Nov 2004 21:10:09 -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 Sat, 6 Nov 2004 Volume: 10 Number: 7372
Today's topics:
Re: Solaris taking over Perl ownership (krakle)
Re: Solaris taking over Perl ownership (krakle)
Re: Solaris taking over Perl ownership <spamtrap@dot-app.org>
Re: Solaris taking over Perl ownership <spamtrap@dot-app.org>
Re: Solaris taking over Perl ownership <1usa@llenroc.ude.invalid>
Re: Solaris taking over Perl ownership <spamtrap@dot-app.org>
Re: Spurious "Use of uninitialized value" with -w, redu <usenet@morrow.me.uk>
Re: Using libwww to retrieve a UTF-8 webpage <usenet@morrow.me.uk>
Re: Win32::OLE msxml collection problem <usenet@morrow.me.uk>
Re: Win32::OLE msxml collection problem <simon@unisolve.com.au>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 6 Nov 2004 18:23:20 -0800
From: krakle@visto.com (krakle)
Subject: Re: Solaris taking over Perl ownership
Message-Id: <237aaff8.0411061823.272ddb6b@posting.google.com>
"Tintin" <tintin@invalid.invalid> wrote in message news:<2v2tjbF2gaj8aU1@uni-berlin.de>...
> "krakle" <krakle@visto.com> wrote in message
> news:237aaff8.0411051709.66c732ae@posting.google.com...
> > Abigail <abigail@abigail.nl> wrote in message
> > news:<slrncomchf.mg8.abigail@alexandra.abigail.nl>...
> >> However, IIRC (I don't have a box I can check at the moment) on Solaris,
> >> the "system" perl
> >
> > The what? perl? What's that? You mean Perl.
> >
> >> isn't /usr/bin/perl - instead, /usr/bin/perl is a link
> >> to the "system" perl.
> >
> > perl? You mean Perl.
>
> No, he wrote 'perl' and really did mean 'perl', because it is 'perl'.
>
> You need to recheck the FAQ.
>
> perldoc -q difference
>
> >
> >> You're free to replace the /usr/bin/perl link with
> >> something of your choice, as the Solaris tools will use the real path
> >> to the "system" perl. As long as you keep that perl
> > ^^^ ^^^
> >
> > Correct those 2 to Perl.
>
> s/Correct those 2/It would be incorrect to change them/
>
> >
> >> I think SUN did a better job of dealing with perl than many other OSses
> > ^^^
> >
> > Perl.
> >
> >> Why is the opinion of the Perl community important related to this issue?
> >
> > And you finally learned :)
>
> And wouldn't it be nice if you checked the FAQ and learned the difference
> yourself.
>
>
> > I love the hypocritical Perl community whose corrections of others are
> > their own mistakes... God bless us...
>
> Pot, kettle, black
Perl language. Perl code. perl interputer.
------------------------------
Date: 6 Nov 2004 18:23:52 -0800
From: krakle@visto.com (krakle)
Subject: Re: Solaris taking over Perl ownership
Message-Id: <237aaff8.0411061823.74c77b4b@posting.google.com>
Tad McClellan <tadmc@augustmail.com> wrote in message news:<slrncoofmc.i8r.tadmc@magna.augustmail.com>...
>
> There is a FAQ about the difference between "perl" and "Perl" you know.
Did you read them? I was correct.
Perl language. Perl code. perl interputer.
------------------------------
Date: Sat, 06 Nov 2004 22:29:49 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Solaris taking over Perl ownership
Message-Id: <iPidncJp6okzCxDcRVn-gw@adelphia.com>
krakle wrote:
> Did you read them?
Has Tad read the FAQ? You can't be serious.
> Perl language. Perl code. perl interputer.
Which is why you were wrong. Each and every instance of "perl" that you
claimed should have been "Perl" was in fact correct, as it was referring
to the *interpreter*, not the language.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Sat, 06 Nov 2004 22:37:05 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Solaris taking over Perl ownership
Message-Id: <J7ydnSinS6z_BRDcRVn-tQ@adelphia.com>
krakle wrote:
> Abigail <abigail@abigail.nl> wrote in message news:<slrncomchf.mg8.abigail@alexandra.abigail.nl>...
>
>>However, IIRC (I don't have a box I can check at the moment) on Solaris,
>>the "system" perl
>
> The what? perl? What's that? You mean Perl.
No, he means perl. He's referring to the interpreter, not the language.
>>isn't /usr/bin/perl - instead, /usr/bin/perl is a link
>>to the "system" perl.
>
> perl? You mean Perl.
Nope. The interpreter again.
>>You're free to replace the /usr/bin/perl link with
>>something of your choice, as the Solaris tools will use the real path
>>to the "system" perl. As long as you keep that perl
>
> ^^^ ^^^
> Correct those 2 to Perl.
Nope. The interpreter.
>>I think SUN did a better job of dealing with perl than many other OSses
>
> ^^^
> Perl.
Nope. The interpreter.
>>Why is the opinion of the Perl community important related to this issue?
>
> And you finally learned :)
No, he's referring to the language and not the interpreter here.
Krackle, get over yourself. Abigail has nothing to learn from you.
Abigail knew the difference between Perl and perl when you were still
riding the short bus to kindergarten.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: 7 Nov 2004 04:07:12 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Solaris taking over Perl ownership
Message-Id: <Xns9599EB325EC3Basu1cornelledu@132.236.56.8>
krakle@visto.com (krakle) wrote in
news:237aaff8.0411061823.272ddb6b@posting.google.com:
> Perl language. Perl code. perl interputer.
Define iterputer please. I don't think I have ever used one. I don't know
how I ever got by without one seeing as how vital it seems to Perl
programming.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: Sat, 06 Nov 2004 23:12:27 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Solaris taking over Perl ownership
Message-Id: <LJKdnepnKZ02PRDcRVn-tw@adelphia.com>
A. Sinan Unur wrote:
> Define iterputer please.
Never misunderestimate the strength of a nukular interputer. ;-)
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Sat, 6 Nov 2004 15:56:03 +0000
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Spurious "Use of uninitialized value" with -w, redux
Message-Id: <jp8v52-g45.ln1@osiris.mauzo.dyndns.org>
Quoth Michele Dondi <bik.mido@tiscalinet.it>:
> On Fri, 05 Nov 2004 15:25:06 GMT, samwyse <dejanews@email.com> wrote:
>
> >to find one. That usually indicates a failure on my part, but in this
> >case I also am using 'use strict;' and it, too, fails to find anything
> >wrong when the '-w' option is removed. Either there's a very subtl
>
> As a side note C<use strict;> and C<use warnings;> are to a large
> extent orthogonal. Hence your claim doesn't make *much* sense...
To be fair, a common source of 'use of uninit value' warnings is
misspelling variable names when not using strict, so the OP is simply
saying that he has eliminated that possible source of error.
Ben
--
Heracles: Vulture! Here's a titbit for you / A few dried molecules of the gall
From the liver of a friend of yours. / Excuse the arrow but I have no spoon.
(Ted Hughes, [ Heracles shoots Vulture with arrow. Vulture bursts into ]
/Alcestis/) [ flame, and falls out of sight. ] ben@morrow.me.uk
------------------------------
Date: Sat, 6 Nov 2004 16:10:16 +0000
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Using libwww to retrieve a UTF-8 webpage
Message-Id: <8k9v52-g45.ln1@osiris.mauzo.dyndns.org>
Quoth "EH" <bogusasdfasdf@hotmail.com>:
> It turns out at least part of my problem was that Google detects the
> user agent and sends a different type of encoding depending on the
> capabilities of the receiving browser. If I pretend that I'm IE 6.0,
> I'll get a meta header that says the document is UTF-8, but
> unfortunately, the document is still not saved correctly. I changed
> the above code to be:
>
> use utf8;
This is not useful. Read the docs for the pragmas you use.
You are using 5.8, aren't you? You should be, if you want Unicode.
> use Encode;
> use LWP::UserAgent;
>
> $ua = LWP::UserAgent->new;
>
> my @ns_headers = (
> 'User-Agent' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
> .NET CLR 1.1.4322)',
> 'Accept' => 'text/html, image/gif, image/x-xbitmap,
Heh heh, I'd like to see IE understand an XBM... :)
> image/jpeg,
> image/pjpeg, image/png, */*',
> 'Accept-Charset' => 'UTF-8',
> 'Accept-Language' => 'en-US',
> );
>
> $url = "http://news.google.com/news?ned=cn&hl=zh-CN";
> #$url = "http://news.google.com.tw/news?ned=it&hl=it";
>
> my $content = $ua->get($url, @ns_headers);
Do you know if LWP is Unicode-aware? You may need to to Encode::decode
this from UTF8 manually.
> open TEST, ">:utf8", "wwwutftest.html" || die "failed to open $!\n";
In general it is better to use the :encoding(utf8) layer rather than the
:utf8 layer, as it (ought) to give you better recovery from errors.
> if ($content->is_success) {
> print TEST $content->content();
> } else {
> print "failed to get: $!";
> }
>
> close(TEST);
>
> If anyone has any suggestions on how I can correctly save UTF-8 pages,
> I would much appreciate it.
If the above does not solve your problem, can you give (small) hex dumps
showing what you get in the file and what you were expecting?
Ben
--
And if you wanna make sense / Whatcha looking at me for? (Fiona Apple)
* ben@morrow.me.uk *
------------------------------
Date: Sat, 6 Nov 2004 16:01:51 +0000
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Win32::OLE msxml collection problem
Message-Id: <f49v52-g45.ln1@osiris.mauzo.dyndns.org>
Quoth Simon Taylor <simon@unisolve.com.au>:
> Jay Tilton wrote:
> > "Marcus" <lumbus@ludd.luth.se> wrote:
> >
> > : This is probably a stupid questions since I'm a beginner in Win32::OLE and
> > : In the code below I can get the length from $members, but the next line
> > : outputs:
> > : "member array name: Win32::OLE=HASH(0x1825090)->Item(0)->{text}"
> > :
> > : code:
> > : $members = $object->getElementsByTagName("BriefDescription");
> > : print "$members->{length}\n";
> > : print "member array name: $members->Item(0)->{text}\n";
> > ^^^^^^^^^
> > Subroutine and method calls are not interpolated into double-quoted
> > strings.
>
> Quite right, unless of course one dereferences the method call
> and then creates a scalar reference to that with the ${ } construct,
You've got \ and ${} the wrong way round... :)
> in which case a method call can be interpolated in double-quoted string
> context, as in:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> use CGI;
>
> my $q = new CGI;
> print "Not the output of the header method: $q->header()\n";
> print "The output of the header method: ${ \$q->header() }\n";
However, this still calls $q->header in list context, so it would be
better to use "@{[ $q->header ]}" to make that clear (if you must use
those constructs at all).
Ben
--
Although few may originate a policy, we are all able to judge it.
- Pericles of Athens, c.430 B.C.
ben@morrow.me.uk
------------------------------
Date: Sun, 07 Nov 2004 10:14:57 -0800
From: Simon Taylor <simon@unisolve.com.au>
Subject: Re: Win32::OLE msxml collection problem
Message-Id: <cmjsqm$n7e$1@otis.netspace.net.au>
Ben Morrow wrote:
> Quoth Simon Taylor <simon@unisolve.com.au>:
>
>>Jay Tilton wrote:
>>
>>>"Marcus" <lumbus@ludd.luth.se> wrote:
>>>
>>>: This is probably a stupid questions since I'm a beginner in Win32::OLE and
>>>: In the code below I can get the length from $members, but the next line
>>>: outputs:
>>>: "member array name: Win32::OLE=HASH(0x1825090)->Item(0)->{text}"
>>>:
>>>: code:
>>>: $members = $object->getElementsByTagName("BriefDescription");
>>>: print "$members->{length}\n";
>>>: print "member array name: $members->Item(0)->{text}\n";
>>> ^^^^^^^^^
>>>Subroutine and method calls are not interpolated into double-quoted
>>>strings.
>>
>>Quite right, unless of course one dereferences the method call
>>and then creates a scalar reference to that with the ${ } construct,
>
>
> You've got \ and ${} the wrong way round... :)
No, it's quite correct, run it and see...
>>in which case a method call can be interpolated in double-quoted string
>>context, as in:
>>
>>#!/usr/bin/perl
>>use strict;
>>use warnings;
>>use CGI;
>>
>>my $q = new CGI;
>>print "Not the output of the header method: $q->header()\n";
>>print "The output of the header method: ${ \$q->header() }\n";
>
>
> However, this still calls $q->header in list context, so it would be
> better to use "@{[ $q->header ]}" to make that clear (if you must use
> those constructs at all).
I agree, these sort of constructs are a little on the exotic side, and
don't aid readability ;-)
All the best,
------------------------------
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 7372
***************************************