[18337] in Perl-Users-Digest
Perl-Users Digest, Issue: 505 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 16 14:10:55 2001
Date: Fri, 16 Mar 2001 11:10:31 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <984769831-v10-i505@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 16 Mar 2001 Volume: 10 Number: 505
Today's topics:
Re: HTTP Client Question <mischief@velma.motion.net>
Re: HTTP Client Question (Miguel Cruz)
Re: HTTP Client Question (Miguel Cruz)
Re: HTTP Client Question (Anno Siegel)
IN dereferencing <ubl@schaffhausen.de>
Re: IN dereferencing nobull@mail.com
Re: Keystroke shortcuts (LK)
Most efficient way to extract unique array elements? (t (Billy Peterson)
Re: Most efficient way to extract unique array elements <tom@power.net.uk>
Re: Most efficient way to extract unique array elements <joe+usenet@sunstarsys.com>
NEWBEE: Format Question WA Support
Re: NEWBEE: Format Question nobull@mail.com
Re: NEWBEE: Format Question <joe+usenet@sunstarsys.com>
Re: Overloading in OO perl (Ilya Zakharevich)
Re: Perl And CGI brichards@cda.com
Re: Perl And CGI brichards@cda.com
Re: Perl FAQ? <mjcarman@home.com>
Re: Perl FAQ? (Tad McClellan)
Re: Print own "die" message <mischief@velma.motion.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 16 Mar 2001 16:23:34 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: HTTP Client Question
Message-Id: <tb4fg6t3v2t3d@corp.supernews.com>
Gary O'Keefe <gary@onegoodidea.com> wrote:
> On 15 Mar 2001 14:09:16 -0800, merlyn@stonehenge.com (Randal L.
> Schwartz) wrote:
>>>>>>> "Gary" == Gary O'Keefe <gokeefe@gssec.bt.co.uk> writes:
>>
> How a person chooses to enact their anonymity is their business. It's
> not up to any of us to dictate the 'correct' (or should I say
> orthodox?) way of posting anonymously. So she was posting from a fake
> address...
> So what?
>
> It's not as if a quick whois check at internic won't have found out
> that it was a fake domain. You were acting like she was commiting
> identity fraud (and you were big daddy cop too). She wasn't posting as
> billg@microsoft.com. She wasn't trying to dupe anyone into sending her
> money.
I guess if someone started posting from your domain, and just
happened to unknowingly choose the local address part to your
email address you'd want to receive all the mail - positive
and negative - sent to that person?
How about if someone started posting with a fake address that
didn't exist, then you registered it and started getting requests
to enforce the AUP you have set up for your network because
someone dislikes the actions of the person posting. When you
explain that you can't or won't contact the person or close their
network account, you get null routed at the other person's
network. "Just because they are posting from some other IP
doesn't mean you shouldn't take care of it. After all, they're
using an email address on your domain to gather responses," the
network admin on the other end says. This wouldn't bother you
until one of your legtitimate employees/customers/whatever
actually tries to send traffic to that network. This might sound
outlandish, but I've had to clear this type of issue up with
other administrators about 5 times in the last three years.
Chris
--
Christopher E. Stith
Even in the worst of times, there is always someone who's
never had it better. Even in the best of times, there is
always someone who's never had it worse.
------------------------------
Date: Fri, 16 Mar 2001 17:46:52 GMT
From: mnc@admin.u.nu (Miguel Cruz)
Subject: Re: HTTP Client Question
Message-Id: <gkss6.6693$on6.2373637@typhoon2.ba-dsg.net>
Scott R. Godin <webmaster@webdragon.munge.net> wrote:
> what's a "taliban" ?
The accusative of "talibun", which means "student".
miguel
------------------------------
Date: Fri, 16 Mar 2001 17:52:07 GMT
From: mnc@admin.u.nu (Miguel Cruz)
Subject: Re: HTTP Client Question
Message-Id: <bpss6.6700$on6.2377629@typhoon2.ba-dsg.net>
Gary O'Keefe <gary@onegoodidea.com> wrote:
> How a person chooses to enact their anonymity is their business. It's
> not up to any of us to dictate the 'correct' (or should I say
> orthodox?) way of posting anonymously. So she was posting from a fake
> address...
>
> So what?
Well, it would be annoying for anyone who in fact owned (or came to own) the
domain.
When I registered 'u.nu' (attractive to me because it was very short) I did
not anticipate that hundreds of jokers net-wide would use addresses like
'wish@u.nu' and 'fuck@u.nu' whenever they signed up for web sites that
required email addresses. I have crud (not random spam, but "thank you for
registering and here's your giant daily HTML update") coming to these
addresses that now goes to /dev/null at a rate that sometimes reaches
megabytes per DAY.
miguel
------------------------------
Date: 16 Mar 2001 18:02:26 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: HTTP Client Question
Message-Id: <98tkfi$g66$1@mamenchi.zrz.TU-Berlin.DE>
According to Bob Dilworth <avast@hortonsbay.com>:
> On 15 Mar 2001 15:38:51 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
> Siegel) wrote:
>
> >Indeed. Moreover, the immense popularity of Perl as a "web language"
> >takes care that a large part of those postings that are (marginally)
> >on topic are put forward by people with little programming experience,
> >little interest in Perl as a language an no motivation to learn much
> >about both. It does make folks grumpy, yours truly included.
>
> There's an interesting assumption in the above snippet. First - just
> because someone comes to clpm to ask what you may consider an
> inappropriate question does not imply that they have little or no
> motivation to learn Perl. It may be true for some but not for all.
It's you who is making an assumption about how I reach my conclusion.
I don't base it on my judgment of what question is appropriate, but
on the behavior of the poster. There is a substantial subset of
new posters who clearly show they have no interest in programming,
Perl or otherwise. Some frankly say so. Others have nothing to
say when asked what they have done so far. There are other signs,
none of which have to do with whether I like the question.
> Publicly "plonking" them for "jeopardy" posting serves no purpose
> other than, in my view, arrogance. It is also seems quite mean and
> intolerant. Why waste all that energy on public humiliation when you
> can simply ignore the posting?
Because it damages the thread it appears in. Posting style is
*not* a matter of personal preference.
[rest of somewhat tiring argumentation snipped]
Anno
------------------------------
Date: Fri, 16 Mar 2001 17:09:38 +0100
From: Malte Ubl <ubl@schaffhausen.de>
Subject: IN dereferencing
Message-Id: <3AB23AC3.281742AA@schaffhausen.de>
Hi,
I was wondering how bad the time panelty for a VisualBasic (Yes, I know)
style dereferencing function is?
Example:
sub IN {
my $data_structure = shift;
if(ref($data_structure) eq "ARRAY") {
return @{$arrayref}
}
# ... other data structures
}
Thanx,
->malte
------------------------------
Date: 16 Mar 2001 17:19:50 +0000
From: nobull@mail.com
Subject: Re: IN dereferencing
Message-Id: <u9vgp9d421.fsf@wcl-l.bham.ac.uk>
Malte Ubl <ubl@schaffhausen.de> writes:
> I was wondering how bad the time panelty...
perldoc Benchmark
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Fri, 16 Mar 2001 16:07:23 GMT
From: lkenny@fisheries.org (LK)
Subject: Re: Keystroke shortcuts
Message-Id: <3ab239d0.4760366@wingate>
On Thu, 15 Mar 2001 18:29:43 GMT, Uri Guttman <uri@sysarch.com> wrote:
>first, you posted this twice with different subjects and bodies. don't
>do that.
The reason that happened was because my first message did not seem to
go up at all. So I wrote a second message as close to I could remeber
the first. I apologize that both went up and I will remove the other
one.
>second, what are you talking about? where are these keyboard strokes
>coming from? perl can read them but then it is reading from the keyboard
>and not from a document.
>
>so figure out how to express what you really want and post again. the
>PSI::ESP module is telling that you can't do what you want since what
>you want makes no sense.
Thanks for the help.
LK
------------------------------
Date: Fri, 16 Mar 2001 11:06:28 -0500
From: billyNOSPAMPLEASE@answerfolks.com (Billy Peterson)
Subject: Most efficient way to extract unique array elements? (thanks but must be arrays)
Message-Id: <billyNOSPAMPLEASE-1603011106280001@tritone.csbmb.princeton.edu>
In article
<billyNOSPAMPLEASE-1603010050050001@sdn-ar-002njprinp319.dialsprint.net>,
billyNOSPAMPLEASE@answerfolks.com (Billy Peterson) wrote:
> Dear Perl programmers,
>
> Please excuse the amateurish question, I'm trying to break from the world
> of shell programming into Perl. I have to get a list of the unique
> elements in array 1 and put them into array 2. For example,
>
> car
> bike
> car
> truck
> bike
>
> would yield
>
> car
> bike
> truck
>
> I have been doing this by outputting array 1 into a file, running the file
> through the Ustat command uniq and directing that into another file,
> opening that file and putting the contents into an array. Then unlinking
> the created files. I'm hoping there is a Perl command for this, or at
> least a more efficient method.
>
> Regards,
> Billy P.
Hi, thanks for the suggestions to use a hash to accomplish this. I should
know by now not to oversimplify problem descriptions. In fact I have to
use arrays, for a few reasons, among them scalability to multi-dimensional
arrays, and if I use a hash each time I will have to do a lot of
converting back and forth.
So, without using a hash, is there an easy way to get unique elements from
an array, or do I just need to loop through array A, test each element
against array B, and if it's not in B add it?
Regards,
Billy P.
------------------------------
Date: Fri, 16 Mar 2001 16:20:02 +0000
From: Tom Scheper <tom@power.net.uk>
Subject: Re: Most efficient way to extract unique array elements? (thanks but must be arrays)
Message-Id: <f8f4bt0qvc1odshsil9a8nnj81thsrc87o@4ax.com>
On Fri, 16 Mar 2001 11:06:28 -0500, billyNOSPAMPLEASE@answerfolks.com
(Billy Peterson) shed a beam of light on us:
>In article
><billyNOSPAMPLEASE-1603010050050001@sdn-ar-002njprinp319.dialsprint.net>,
>billyNOSPAMPLEASE@answerfolks.com (Billy Peterson) wrote:
>
>> Dear Perl programmers,
>>
>> Please excuse the amateurish question, I'm trying to break from the world
>> of shell programming into Perl. I have to get a list of the unique
>> elements in array 1 and put them into array 2. For example,
>>
>> car
>> bike
>> car
>> truck
>> bike
>>
>> would yield
>>
>> car
>> bike
>> truck
>>
>> I have been doing this by outputting array 1 into a file, running the file
>> through the Ustat command uniq and directing that into another file,
>> opening that file and putting the contents into an array. Then unlinking
>> the created files. I'm hoping there is a Perl command for this, or at
>> least a more efficient method.
>>
>> Regards,
>> Billy P.
>
>
>
>Hi, thanks for the suggestions to use a hash to accomplish this. I should
>know by now not to oversimplify problem descriptions. In fact I have to
>use arrays, for a few reasons, among them scalability to multi-dimensional
>arrays, and if I use a hash each time I will have to do a lot of
>converting back and forth.
>
>So, without using a hash, is there an easy way to get unique elements from
>an array, or do I just need to loop through array A, test each element
>against array B, and if it's not in B add it?
>
> Regards,
> Billy P.
You can make multidimensional hashed arrays.
-=Cornelis
------------------------------
Date: 16 Mar 2001 11:45:47 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Most efficient way to extract unique array elements? (thanks but must be arrays)
Message-Id: <m3wv9pu0g4.fsf@mumonkan.sunstarsys.com>
billyNOSPAMPLEASE@answerfolks.com (Billy Peterson) writes:
> Hi, thanks for the suggestions to use a hash to accomplish this. I should
> know by now not to oversimplify problem descriptions. In fact I have to
> use arrays, for a few reasons, among them scalability to multi-dimensional
> arrays, and if I use a hash each time I will have to do a lot of
> converting back and forth.
Nonsense- you *don't* need to use arrays- why on earth would someone
require you to do it the wrong way? Look, you start with a LIST that has
many common elements, and what you want is LIST that has only unique
elements. What you do with that LIST is your business, but the best
way to produce that LIST is to use a hash. Here's one way that keeps
the list's ordering (and stuffs the result into an array):
{
my %seen;
@unique = grep { ! $seen{$_}++ } @nonunique;
}
You could easily turn this block into a sub. If you want to directly
manipulate the original array, try this:
sub unique ($) {
my $ary_ref = shift;
my %seen;
@{$ary_ref} = grep { ! $seen{$_}++ } @{$ary_ref};
}
print unique \@array;
This will "scale" nicely to multidimensional arrays.
> So, without using a hash, is there an easy way to get unique
> elements from an array,
No.
>or do I just need to loop through array A, test each element
> against array B, and if it's not in B add it?
Yes.
Joe Schaefer
--
$.=$[|3*rand;$_=67014523;END{print@_};*UNIVERSAL::AUTOLOAD=sub{&A;pop->();++
$#;*A};$.++,*[=*]=*\=sub{$].=pop.(--$#%2?q: ::qq::)};*#=sub{split m, (?<=^.{2})
(.{$.}),x,shift};@#=qw[just another Perl hacker];*A=*AUTOLOAD=sub{split"::",$A;
&]};map{splice@#,$_,1,&#($#[$_])}3,1;$_="@{[@#[m$.$g]]}";s;P;,p;;eval;$\.="\n"
------------------------------
Date: Fri, 16 Mar 2001 17:57:18 GMT
From: WA Support
Subject: NEWBEE: Format Question
Message-Id: <3ab2532b.153963097@news.wildapache.net>
Hello,
I grabbed an example from the perlform name page, i.e.:
#!/usr/bin/perl
use Carp;
sub swrite {
croak "usage: swrite PICTURE ARGS" unless @_;
my $format = shift;
$^A = "";
formline($format,@_);
return $^A;
}
$string = swrite(<<'EOF', 1, 2, 3);
Check me out
@<<< @||| @>>>
EOF
print $string;
But when I run this I get:
Can't find string terminator "EOF" anywhere before EOF at testtmpl.pl
line 12.
Could someone please tell me what I am doing wrong here?
Thanks,
Murrah Boswell
------------------------------
Date: 16 Mar 2001 18:14:33 +0000
From: nobull@mail.com
Subject: Re: NEWBEE: Format Question
Message-Id: <u9pufhd1iu.fsf@wcl-l.bham.ac.uk>
WA Support writes:
> Subject: NEWBEE: Format Question
Your question has nothing to do with formats. Yes your script uses
formats but there is no reason for you to suspect that error you are
getting is related to this.
BTW: Putting 'newbie' in your Subject line is a bad idea - most people
who do it really mean "I'm too lazy to RTFM". You probably don't want
to cause yourself to be associated with them.
> Can't find string terminator "EOF" anywhere before EOF at testtmpl.pl
> line 12.
Perl error messages, their meanings and likely causes are documented
in the perl manual "perldiag". The perldiag entry for the above error
message correctly identifies what you have done wrong.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 16 Mar 2001 13:30:27 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: NEWBEE: Format Question
Message-Id: <m3ofv1tvlo.fsf@mumonkan.sunstarsys.com>
WA Support writes:
Subject: Re: NEWBEE: Format Question
Congratulations- had you spellt NEWBEE correctly, your post
would have been entirely invisible. As it is, it's just scored
down considerably since you used "Question", which isn't as bad.
Don't use CAPS and silly words in the subject; Something like
Subject: trouble with perlform code
would have been more useful. You post is quite clear and
well written, and it deserved a better subject line.
>
> I grabbed an example from the perlform name page, i.e.:
>
> #!/usr/bin/perl
^^
-w
use strict;
use diagnostics;
>
> use Carp;
> sub swrite {
> croak "usage: swrite PICTURE ARGS" unless @_;
> my $format = shift;
> $^A = "";
> formline($format,@_);
> return $^A;
> }
my
vv
> $string = swrite(<<'EOF', 1, 2, 3);
> Check me out
> @<<< @||| @>>>
> EOF
^^
> print $string;
> Could someone please tell me what I am doing wrong here?
% perldoc -q "here document"
Yup- it's in the FAQ, but you might not have known where/how to
look for it. perldiag helps a lot whenever you're confused about
an error message.
HTH
Joe Schaefer
--
"You may be a mighty king," he said. "But you're sitting in oobleck up to your
chin. And so is everyone else in your land. And if you won't even say you're
sorry, you're no sort of a king at all!"
-- Dr. Seuss
------------------------------
Date: 16 Mar 2001 18:25:59 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Overloading in OO perl
Message-Id: <98tlrn$5ua$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Abigail
<abigail@foad.org>],
who wrote in article <slrn9b4c0j.863.abigail@tsathoggua.rlyeh.net>:
> \\ sub new {
> \\ if (ref $anArg eq ARRAY) {
> \\ do something
> \\ elsif ($anArg =~ /^\d+$/ ) {
> \\
> \\ do something else
> That's the way of doing it in Perl.
Since the names of constructors are not hardwired in Perl, you can
also have different flavors named differently.
Ilya
------------------------------
Date: 16 Mar 2001 17:22:30 GMT
From: brichards@cda.com
Subject: Re: Perl And CGI
Message-Id: <98ti4m$53v$1@news.netmar.com>
your best bet is www.activestate.com. Once you get started, I would
recommend you look into the PerlEx product. It is a FastCGI-like
enhancement.
----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net
------------------------------
Date: 16 Mar 2001 17:23:11 GMT
From: brichards@cda.com
Subject: Re: Perl And CGI
Message-Id: <98ti5v$56e$1@news.netmar.com>
your best bet is www.activestate.com. Once you get started, I would
recommend you look into the PerlEx product. It is a FastCGI-like
enhancement.
----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net
------------------------------
Date: Fri, 16 Mar 2001 10:15:23 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: Perl FAQ?
Message-Id: <3AB23C1B.CB256AD8@home.com>
Mike Flaherty wrote:
>
> As an aside, I find it disappointing that anyone would discourage any
> questions within this forum. This is a Perl forum for "miscellaneous"
> questions right? If someone can't ask a "stupid" question here, then
> what else is it here for.
This forum is for asking miscellaneous[1] questions about the Perl
language[2] which someone has been unable to find an answer to by
checking the documentation that comes as a standard part of the Perl
distribution.
[1] Not covered by another, more specific newsgroup. e.g.
comp.lang.perl.tk
[2] Not about Perl jobs, nor which editor one should use write scripts,
nor about things which are done with Perl but not themselves Perl
(e.g. CGI), etc., etc., ad naseum.
> It is axiomatic that "newbies" will not know where to find the answers
> they need
True, but if they can find their way to Usenet, one would like to think
they can find their way to the standard documentation. If not, we try to
give them a good nudge in the right direction.
> [T]he Perl FAQ can be overwhelming if you don't know the concepts
> behind the answers.
I've never seen anyone criticized for not understanding the FAQ, just
for failing to even check it.
> I find the abrasive dialogue to be very undermining.
It can be, but I think that some people are just too sensitive. If you
have a bit of a thick skin and don't take everything personally you'll
be much happier here. With rare exceptions, the people responding to
posts here are only offering constructive criticism, and it should be
taken as such. That's how we learn.
> While Perl does enjoy a strong following, how do folks expect to
> sustain its popularity by berating people who ask simple questions.
The evolutionists among us might say that we're just thinning the herd.
;)
> Despite all of the flames against Kellyboy his question did lead me to
> a new resource - www.perldoc.com. I like how it is arranged.
I've seen nothing in this thread that I would consider a flame. Uri was
a bit on the sarcastic side... :) ...but not abrasive.
> Remember. There is no such thing as a dumb question.
Keep in mind that Usenet is not a high-school classroom. You don't have
a single, dedicated, paid professional overseeing a relatively small
number of students. The "no such thing as a dumb question" philosophy
works well in that environment, but not in this one. What you have here
is a massive, global, peer-supported network. If everyone who ever
wanted to do X asked how here, this newsgroup would be absolutely
flooded with the same FAQs over and over again. The people who answer
questions here do so because they want to help. Answering the same
question a thousand times is tedious, so eventually they stop answering
it. If the newsgroup is so full of FAQs that they can't find the novel,
interesting, even challenging ones that they would like to answer, they
leave. Who helps the newbies then? This newsgroup *depends* on the
knowledgeable people who graciously donate their time and talents to
answering questions. If they want to insist that people try to help
themselves first by checking the docs, if that "abrasiveness" is the
price for their continued assistance, then I say so be it.
-mjc
------------------------------
Date: Fri, 16 Mar 2001 11:55:47 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Perl FAQ?
Message-Id: <slrn9b4hcj.97k.tadmc@tadmc26.august.net>
Mike Flaherty <mflaherty2@earthlink.net> wrote:
>As an aside, I find it disappointing that anyone would discourage any
^^^
>questions within this forum.
Well you will just have to live with the disappointment then,
because that is how it is.
>This is a Perl forum for "miscellaneous"
>questions right?
Right. But "miscellaneous" does not include already-answered questions.
"miscellaneous" in a newsgroup name means "doesn't fit in any of
the other newsgroups for this subject". So for Perl that means
it doesn't fit in any of:
comp.lang.perl.announce
comp.lang.perl.moderated
comp.lang.perl.modules
comp.lang.perl.tk
Frequently Asked Questions are never on-topic. This is not a
Perl-specific requirement, it applies to nearly all of the
Big 8 newsgroups.
>If someone can't ask a "stupid" question here, then what
>else is it here for.
Nobody says you cannot ask a stupid question here.
Lots of people say you cannot ask a Frequently Asked Question here.
There is a difference.
Frequently Asked Questions are very seldom "stupid". They are common
and expected questions.
>It is axiomatic that "newbies" will not know where to
>find the answers they need -
Why is that?
Is it SOP to ignore the doc files for software that you install/use?
If you cannot manage word searching across multiple files, then
you are not ready to start learning Perl yet. Take a break, find
out how to do that on your system, then word-search for terms
relevant to the problem de jure.
If word searching for 5-10 minutes doesn't turn up any help,
post away!
>as the Perl FAQ can be overwhelming if you
>don't know the concepts behind the answers.
Nobody complains about not understanding a FAQ answer. Questions
about a FAQ answer are on-topic and should be welcomed here.
Lots of people complain about asking a FAQ where it appears that
you have not even looked at the FAQ answer.
>I find the abrasive dialogue to be very undermining.
It wasn't this abrasive before Virtual September arrived.
(the abrasiveness is not the disease, it is a symptom. The disease
is reasking of questions that have been asked and answered
hundreds of times already.
If everybody checked the FAQs before posting, this newsgroup
would not be so nasty. But that will never happen :-(
)
>While Perl does enjoy
>a strong following, how do folks expect to sustain its popularity by
>berating people who ask simple questions.
We do not (or should not anyway) berate people for asking simple
questions.
We berate people for asking already-answered questions.
There is a difference, as noted above.
>If it really bothers you, then
>spend your time in a moderated newsgroup.
Why should the curmudgeons move?
They were here first. If you don't like the snappiness here then
*you* go somewhere else.
>Call it something like
>"comp.lang.perl.grumpy.programmers".
Call is something like
"comp.lang.perl.already.answered.but.lets.do.it.yet.again.anyway"
or
"comp.lang.perl.faqs.allowed"
or
"alt.perl"
>Remember. There is no such thing as a dumb question.
"Programming Perl" 3rd edition, footnote on page xxxi:
"Of course, some questions are too silly to answer."
---------------------------------------------------------
In article <1995Nov9.193745.13694@netlabs.com>, lwall@netlabs.com (Larry
Wall) wrote: ...
<Larry> [snip] I view a programming language as a place to be
<Larry> explored, like Disneyland. You don't need to have a lot of preparation
<Larry> to explore a theme park. You do have to go along with the crowd
<Larry> control measures, though. In a sense, each ride has its own
<Larry> prerequisites--if you cut in line, you risk getting tossed out of the
<Larry> park.
<Larry>
<Larry> What we have here in this newsgroup is a failure in crowd control.
<Larry> Reading the FAQ is like staying in line--it's something you should
<Larry> learn in kindergarten. Usenet needs a better kindergarten.
---------------------------------------------------------
You have unrealistic expectations if you think everyone will
remain silent when you take cuts in front of them.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 16 Mar 2001 17:02:37 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Print own "die" message
Message-Id: <tb4hpdtf342gd4@corp.supernews.com>
Abigail <abigail@foad.org> wrote:
> Chris Stith (mischief@velma.motion.net) wrote on MMDCCLIV September
> MCMXCIII in <URL:news:tb2oft11ue6p71@corp.supernews.com>:
> || Bart Lateur <bart.lateur@skynet.be> wrote:
> || > Chris Stith wrote:
> ||
> || >>Or even execute a block in which your print() your message then
> || >>exit() -- or you can do that inside a die handler...
> ||
> || > The good thing about the __DIE__ handler is taht it also works on fatal
> || > errors that you didn't expect. Assign it in a BEGIN block upfront your
> || > script, and it will even catch syntax errors.
> ||
> || True. I hadn't thought about using DIE to catch syntax errors, though.
> Actually, it turns out syntax errors are mere warnings, triggering
> $SIG{__WARN__}.
Upon testing, $SIG{__WARN__} does not get executed for me
during a syntax error under 5.005_03 or 5.6.0 on Linux
(RedHat 6.2, kernel 2.2.17, glibc 2.1.3), but $SIG{__DIE__}
does. Here's my test script:
###--- _begin_ _code_ ---
#!/usr/bin/perl -w
use strict;
sub BEGIN {
$SIG{__DIE__} = sub {
print "ARGH!\n";
exit(0);
};
}
my $foo = = 3 + 4;
print $foo . "\n";
###--- _end_ _code_ ---
Do other syntax errors really come up under warn instead of die?
Should that be considered a bug (not that it would use warn --
although I'd personally consider just a warning on a syntax error
a bad idea -- but that it would trigger one or the other)?
Chris
--
Christopher E. Stith
Get real! This is a discussion group, not a helpdesk. You post
something, we discuss its implications. If the discussion happens to
answer a question you've asked, that's incidental. -- nobull, clp.misc
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 505
**************************************