Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Learning Perl

4 views
Skip to first unread message

Elizabeth Barnwell

unread,
Jun 12, 2008, 12:52:52 PM6/12/08
to
Here is a set of flashcards our developers have been using to learn
Perl with very good results:

http://www.yoyobrain.com/subjects/show/3121

Add the subject to your study materials, click on try a learning
drill.

This is an example of one person's study materials, but you can make
your own as well. We are adding features to the site to allow users to
comment on existing content/build learning material together/attribute
content to various sources. With this, we're hoping that the quality
of the information will improve, providing a resource to the
community.

In the mean time, I hope it finds you well.

Best,

Elizabeth

Uri Guttman

unread,
Jun 12, 2008, 3:04:46 PM6/12/08
to
>>>>> "EB" == Elizabeth Barnwell <elizabet...@gmail.com> writes:

EB> Here is a set of flashcards our developers have been using to learn
EB> Perl with very good results:

EB> http://www.yoyobrain.com/subjects/show/3121

EB> Add the subject to your study materials, click on try a learning
EB> drill.

i will have to take a peek as i do with most proffered perl web
tutorials.

EB> This is an example of one person's study materials, but you can make
EB> your own as well. We are adding features to the site to allow users to
EB> comment on existing content/build learning material together/attribute
EB> content to various sources. With this, we're hoping that the quality
EB> of the information will improve, providing a resource to the
EB> community.

the problem is that most learning users of perl don't know enough perl
or how to teach to explain things correctly and with enough depth and
coverage.

Operator to force a list into scalar context

ok, that is classicly wrong. there is no such thing as a list in scalar
context. it should be an array, not list.

these flash cards don't seem to be useful IMO. they are not deep enough
and there is no explanations of anything, just a simple question and
answer. there could be links to the docs, more info in each answer,
better grouping of questions, etc.

Syntax for looping through the values in a list
foreach $var @array {
}

that should be my $var.

Operators to add and remove items from the beginning of array
unshift(@array, new_item)
shift(@array)

what is new_item? unless that is a predeclared sub with a prototype it
is illegal. and it doesn't mention unshift takes a list. nor does it say
which function adds or removes (sure they are in the order mentioned in
the question but it should be pointed out. the same is true for the
push/pop slide.

the slides always say operator for what most call functions. sure they
are operators in some sense (they don't always need parens) but it is
poor terminology to always say operator.

When using qw how do you include the characters in strings that
you are using for qw delimiter
escape them with backslash

qw! string\!1 string\!2 ....!

wow. i can't recall ever needing to escape inside a qw! and most qw's
use matched delimiters or maybe //. no one uses ! !!!

When using qw (quote word) shorcut what other symbols can be
used as the delimiter besides ( )

any

qw# string1 string2 #
qw! string1 string2 !

another wow. explaining about alternate delimiters in general (given the
8 or so ops that support them) would be better. this is why this single
question flash card thing is not a good idea IMO. it stresses studying
for the test (like an MSCE!) and not deeper understanding.

What is the syntax for a list literal
( value1, value2, ....)

huh? that is a list. literals are possible values in the list.

What is the effect of using negative number for an array index
it starts counting from the end of the array backwards

that is from the department of redundant answers department.

How do you access an element in an array
use [ ]
x[3];

i see a syntax bug there!

What value do variables hold until defined
undef

hmm. do arrays and hashes hold undef? that should be scalar variables.

Comparison operator for numbers
==

hmm, i wonder what >, <, >= and <= have to say about that?
s/Comparison/Equality/

How are all numbers stored interally by Perl
double-precision floating-point values

hmm, i wonder what IV's have to say about that?


How can you run Perl with warnings enabled
-e
perl -e program_name

whoops!! that flash card should be flashing red!

so as you can see, this site needs plenty of fixes and editing and it
doesn't seem to be too helpful. simple questions like these is not the
way to learn programming in any language.

uri

--
Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------

Tad J McClellan

unread,
Jun 12, 2008, 8:33:39 PM6/12/08
to
Elizabeth Barnwell <elizabet...@gmail.com> wrote:

> Here is a set of flashcards our developers have been using to learn
> Perl with very good results:


Good results include thinking you have warnings turned on when you don't?

"What character is at the end of every Perl statement?"
^^^^^

while ( <> ) {
print
}

Look Ma! No semicolon!


> Add the subject to your study materials,


I'm going to have to take a pass.


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"

Jim Cochrane

unread,
Jun 12, 2008, 11:16:57 PM6/12/08
to
On 2008-06-13, Tad J McClellan <ta...@seesig.invalid> wrote:
> Elizabeth Barnwell <elizabet...@gmail.com> wrote:
>
>> Here is a set of flashcards our developers have been using to learn
>> Perl with very good results:
>
>
> Good results include thinking you have warnings turned on when you don't?
>
> "What character is at the end of every Perl statement?"
> ^^^^^
>
> while ( <> ) {
> print
> }
>
> Look Ma! No semicolon!
>
>
>> Add the subject to your study materials,
>
>
> I'm going to have to take a pass.

IOW, in Perl, a semicolon is a statement separator, not a statement
terminator.


--

Ben Bullock

unread,
Jun 13, 2008, 5:08:39 AM6/13/08
to
On Thu, 12 Jun 2008 09:52:52 -0700, Elizabeth Barnwell wrote:

> Here is a set of flashcards our developers have been using to learn
> Perl with very good results:
>
> http://www.yoyobrain.com/subjects/show/3121
>
> Add the subject to your study materials, click on try a learning
> drill.

That looks very useful.

Ben Bullock

unread,
Jun 13, 2008, 6:26:15 AM6/13/08
to
On Thu, 12 Jun 2008 19:04:46 +0000, Uri Guttman wrote:


> the problem is that most learning users of perl don't know enough perl
> or how to teach to explain things correctly and with enough depth and
> coverage.

The other problem is that the people who do know enough Perl seem to
prefer writing incomprehensible gibberish ("Camel Books", "perldoc
perlre", etc.) to writing something that normal people can understand.

> Operator to force a list into scalar context
>
> ok, that is classicly wrong. there is no such thing as a list in scalar
> context. it should be an array, not list.

Is it?

> these flash cards don't seem to be useful IMO. they are not deep enough
> and there is no explanations of anything, just a simple question and
> answer.

But a simple question and answer might be more useful to beginners than a
more involved discussion.

> there could be links to the docs, more info in each answer,
> better grouping of questions, etc.

Then they'd be completely inaccessible to beginners.



> Syntax for looping through the values in a list
> foreach $var @array {
> }
>
> that should be my $var.

Why, though? Who's to say that $var isn't declared previously?

> Operators to add and remove items from the beginning of array
> unshift(@array, new_item)
> shift(@array)
>
> what is new_item? unless that is a predeclared sub with a prototype it
> is illegal. and it doesn't mention unshift takes a list.

Yes, you are right. Here's an idea: why don't you go and invade one of
the local schools where you live, get hold of a maths
textbook for five-year-olds, and run around the school screaming,
ranting and shouting at the top of your voice, because it doesn't
contain every single detail about Lebesgue integration over the field
of real numbers? Or you could try the science textbooks for the ten-year-
olds: how about having a good old rant if they don't give an
thorough explanation of Einstein's General Theory of Relativity
complete with equations?

Oh, yes, that's right, people who are starting to learn something
don't usually learn all the details at first.

> nor does it say
> which function adds or removes (sure they are in the order mentioned in
> the question but it should be pointed out. the same is true for the
> push/pop slide.

Yes, if you don't add more and more details to the explanation, it
won't be confusing enough for a complete beginner, then they won't
feel frustrated, give up, and go and learn Python instead.

> the slides always say operator for what most call functions. sure they
> are operators in some sense (they don't always need parens) but it is
> poor terminology to always say operator.

Again, unless it's vitally important, tortured details like this don't
really belong in explanations for beginners. People can learn the details
once they've grasped the concepts more clearly.

> When using qw how do you include the characters in strings that
> you are using for qw delimiter
> escape them with backslash
>
> qw! string\!1 string\!2 ....!
>
> wow. i can't recall ever needing to escape inside a qw! and most qw's
> use matched delimiters or maybe //. no one uses ! !!!

So first you complain that it's too simple, then you complain that
it's too complex?

> When using qw (quote word) shorcut what other symbols can be
> used as the delimiter besides ( )
>
> any
>
> qw# string1 string2 #
> qw! string1 string2 !
>
> another wow. explaining about alternate delimiters in general (given the
> 8 or so ops that support them) would be better.

It would be better, except for the well-known fact that it's much easier
on the human brain to start with a concrete example, then work towards
the general case, than it is to start with the general case. For example,
we learn arithmetic before we learn algebra, we learn to walk before we
learn to run, etc.

> this is why this single
> question flash card thing is not a good idea IMO. it stresses studying
> for the test (like an MSCE!) and not deeper understanding.

What test?

> What is the syntax for a list literal
> ( value1, value2, ....)
>
> huh? that is a list. literals are possible values in the list.
>
> What is the effect of using negative number for an array index
> it starts counting from the end of the array backwards
>
> that is from the department of redundant answers department.

Sorry, but I don't see why it is redundant. That seems like a useful
piece of knowledge to me. C programmers who used a negative number in an
array index would expect to get a crash and a "segmentation fault" error,
so why is it redundant to point out that Perl is different from C here?

> How do you access an element in an array
> use [ ]
> x[3];
>
> i see a syntax bug there!

Agreed, this is an error. If Larry Wall forgot a dollar we'd call it a
"typo" though. So we've established that there are a few typos in the
test.

> What value do variables hold until defined
> undef
>
> hmm. do arrays and hashes hold undef? that should be scalar variables.

Again, too many details. To understand "What value do scalar variables
hold until defined" is just confusing unless one can instantly remember
what "scalar variable" means, which for a beginner is not a given. It
would be better to phrase the question like this:

When we declare a new variable $var with

my $var;

what value does $var contain initially?

There are ways to phrase things so that they are easy to understand and
also not incorrect.

> Comparison operator for numbers
> ==
>
> hmm, i wonder what >, <, >= and <= have to say about that?
> s/Comparison/Equality/

As far as I know, the comparison operator for numbers is <=>.

> How are all numbers stored interally by Perl
> double-precision floating-point values
>
> hmm, i wonder what IV's have to say about that?

The question is a bit weird, I don't know how numbers are stored
internally by Perl.



> How can you run Perl with warnings enabled
> -e
> perl -e program_name
>
> whoops!! that flash card should be flashing red!
>
> so as you can see, this site needs plenty of fixes and editing and it
> doesn't seem to be too helpful.

It needs a few fixes. Trying too hard to find fault with it by
harshly criticising stuff which isn't really broken is counterproductive
though.

> simple questions like these is not the
> way to learn programming in any language.

Hmm, I have no idea, but since there are millions of people out there,
who knows, perhaps it is useful for someone. I don't think it's harmful.

Uri Guttman

unread,
Jun 13, 2008, 8:51:58 AM6/13/08
to
>>>>> "BB" == Ben Bullock <benkasmi...@gmail.com> writes:

BB> On Thu, 12 Jun 2008 19:04:46 +0000, Uri Guttman wrote:
>> the problem is that most learning users of perl don't know enough perl
>> or how to teach to explain things correctly and with enough depth and
>> coverage.

BB> The other problem is that the people who do know enough Perl seem to
BB> prefer writing incomprehensible gibberish ("Camel Books", "perldoc
BB> perlre", etc.) to writing something that normal people can understand.

and how much technical writing or editing have you done?

>> Operator to force a list into scalar context
>>
>> ok, that is classicly wrong. there is no such thing as a list in scalar
>> context. it should be an array, not list.

BB> Is it?

yes. this has been covered here many times.

>> these flash cards don't seem to be useful IMO. they are not deep enough
>> and there is no explanations of anything, just a simple question and
>> answer.

BB> But a simple question and answer might be more useful to beginners than a
BB> more involved discussion.

simple answers out of context are not useful. have you ever given a
class in perl? you have to be able to explain things beyond basic facts.

>> there could be links to the docs, more info in each answer,
>> better grouping of questions, etc.

BB> Then they'd be completely inaccessible to beginners.

nope. you can do that very easily. links to the online docs at
perldoc.perl.org are trivial to make.



>> Syntax for looping through the values in a list
>> foreach $var @array {
>> }
>>
>> that should be my $var.

BB> Why, though? Who's to say that $var isn't declared previously?

and then that would be a likely bug. foreach localizes its loop variable
which would mask the my var. please learn perl before you critique a
critique of a tutorial

perl -le 'my $x = 1 ; for $x ( 1 .. 3 ) {print $x} print $x'
1
2
3
1

>> Operators to add and remove items from the beginning of array
>> unshift(@array, new_item)
>> shift(@array)
>>
>> what is new_item? unless that is a predeclared sub with a prototype it
>> is illegal. and it doesn't mention unshift takes a list.

BB> Oh, yes, that's right, people who are starting to learn something
BB> don't usually learn all the details at first.

but correct syntax is needed. or an explanation of what 'new_item' is.

>> nor does it say
>> which function adds or removes (sure they are in the order mentioned in
>> the question but it should be pointed out. the same is true for the
>> push/pop slide.

BB> Yes, if you don't add more and more details to the explanation, it
BB> won't be confusing enough for a complete beginner, then they won't
BB> feel frustrated, give up, and go and learn Python instead.

nope. they would be pissed at the teacher.

>> the slides always say operator for what most call functions. sure they
>> are operators in some sense (they don't always need parens) but it is
>> poor terminology to always say operator.

BB> Again, unless it's vitally important, tortured details like this don't
BB> really belong in explanations for beginners. People can learn the details
BB> once they've grasped the concepts more clearly.

nope. correct terminology makes it easier to understand and causes fewer
problems later on.

>> When using qw how do you include the characters in strings that
>> you are using for qw delimiter
>> escape them with backslash
>>
>> qw! string\!1 string\!2 ....!
>>
>> wow. i can't recall ever needing to escape inside a qw! and most qw's
>> use matched delimiters or maybe //. no one uses ! !!!

BB> So first you complain that it's too simple, then you complain that
BB> it's too complex?

complex?? showing qw{} vs qw!! is complex? you have a strange view if
that is complex.

>> When using qw (quote word) shorcut what other symbols can be
>> used as the delimiter besides ( )
>>
>> any
>>
>> qw# string1 string2 #
>> qw! string1 string2 !
>>
>> another wow. explaining about alternate delimiters in general (given the
>> 8 or so ops that support them) would be better.

BB> It would be better, except for the well-known fact that it's much easier
BB> on the human brain to start with a concrete example, then work towards
BB> the general case, than it is to start with the general case. For example,
BB> we learn arithmetic before we learn algebra, we learn to walk before we
BB> learn to run, etc.

and you don't get teaching perl or programming languages. sure you start
simple but the concept of alternate delims is a simple one.

>> this is why this single
>> question flash card thing is not a good idea IMO. it stresses studying
>> for the test (like an MSCE!) and not deeper understanding.

BB> What test?

flash cards are a classic method to learn rote material. they rarely
require the need to think. as such they are used for tests covering
finite subject matter. perl is not a finite nor is even a small subset
that easy to rote learn. programming is more about concepts than
details. again, you haven't done any training nor writing if you think
rote learning is a good way to teach perl.

>> What is the syntax for a list literal
>> ( value1, value2, ....)
>>
>> huh? that is a list. literals are possible values in the list.
>>
>> What is the effect of using negative number for an array index
>> it starts counting from the end of the array backwards
>>
>> that is from the department of redundant answers department.

BB> Sorry, but I don't see why it is redundant. That seems like a useful
BB> piece of knowledge to me. C programmers who used a negative number in an
BB> array index would expect to get a crash and a "segmentation fault" error,
BB> so why is it redundant to point out that Perl is different from C here?

hmm, what other direction can you count from the end ot the array?

>> How do you access an element in an array
>> use [ ]
>> x[3];
>>
>> i see a syntax bug there!

BB> Agreed, this is an error. If Larry Wall forgot a dollar we'd call it a
BB> "typo" though. So we've established that there are a few typos in the
BB> test.

50 questions and answers and 1 typo. maybe 3 pages of text. if i saw a
book with such a ratio i would puke. i have tech edited 4 perl books and
none had such a ratio of typos. poor writing and little editing is
obvious here.

>> What value do variables hold until defined
>> undef
>>
>> hmm. do arrays and hashes hold undef? that should be scalar variables.

BB> Again, too many details. To understand "What value do scalar variables
BB> hold until defined" is just confusing unless one can instantly remember
BB> what "scalar variable" means, which for a beginner is not a given. It
BB> would be better to phrase the question like this:

BB> When we declare a new variable $var with

BB> my $var;

BB> what value does $var contain initially?

and when you declare my @array or %hash, what does it contain initially?
arrays and hashes are variables too. and should be covered as much if
not more than scalars

BB> There are ways to phrase things so that they are easy to understand and
BB> also not incorrect.

>> Comparison operator for numbers
>> ==
>>
>> hmm, i wonder what >, <, >= and <= have to say about that?
>> s/Comparison/Equality/

BB> As far as I know, the comparison operator for numbers is <=>.

so you think the q/a is wrong too!

>> How are all numbers stored interally by Perl
>> double-precision floating-point values
>>
>> hmm, i wonder what IV's have to say about that?

BB> The question is a bit weird, I don't know how numbers are stored
BB> internally by Perl.

then why is it being asked? and why would you think it is important or
not? why did you comment?



>> How can you run Perl with warnings enabled
>> -e
>> perl -e program_name
>>
>> whoops!! that flash card should be flashing red!
>>
>> so as you can see, this site needs plenty of fixes and editing and it
>> doesn't seem to be too helpful.

BB> It needs a few fixes. Trying too hard to find fault with it by
BB> harshly criticising stuff which isn't really broken is counterproductive
BB> though.

a few? this was 50 questions. i found 15+ mistakes or bad wording. that
is an awfully high ratio.

>> simple questions like these is not the
>> way to learn programming in any language.

BB> Hmm, I have no idea, but since there are millions of people out there,
BB> who knows, perhaps it is useful for someone. I don't think it's harmful.

you haven't seen enough bad perl tutorials. google for them and then
come back. the harm of them is way beyond your knowledge. ever heard of
matt's scripts and the damage they caused perl for years?

Uri Guttman

unread,
Jun 13, 2008, 8:52:51 AM6/13/08
to
>>>>> "BB" == Ben Bullock <benkasmi...@gmail.com> writes:

BB> That looks very useful.

only to those that don't know about teaching perl. sorry but this is no
better than the rest of the poor perl tutorials on the net.

brian d foy

unread,
Jun 13, 2008, 9:38:13 AM6/13/08
to
In article
<dfa1a2b1-0455-4bf1...@56g2000hsm.googlegroups.com>,
Elizabeth Barnwell <elizabet...@gmail.com> wrote:

> Here is a set of flashcards our developers have been using to learn
> Perl with very good results:

I saw those, and about half of the Perl answers were wrong, and many of
the Perl *questions* were wrong too. Everyone should stay away from
this Perl stuff, at least until the information is fixed. You might,
for
example, read my book called "Learning Perl" :)

I guess the technology is okay, but I don't see the point of trying to
learn a programming language without actually programming. Memorization
isn't worth much when you should be able to look up anything you need
at the same time you are programming.

Randal L. Schwartz

unread,
Jun 13, 2008, 9:44:20 AM6/13/08
to
>>>>> "Jim" == Jim Cochrane <allergic...@no-spam-allowed.org> writes:

Jim> IOW, in Perl, a semicolon is a statement separator, not a statement
Jim> terminator.

No, you're recalling Pascal.

In Perl, it is indeed a statement terminator, but only for those statements
that require it (not a while or an if, for example). However, the final
semicolon of any scope (file or block or eval-string) is optional.

print "Just another Perl hacker,"; # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

Elizabeth Barnwell

unread,
Jun 13, 2008, 4:18:54 PM6/13/08
to
On Jun 13, 8:44 am, mer...@stonehenge.com (Randal L. Schwartz) wrote:

Hi Everyone,

Thank you for your candid feedback. I do appreciate it. Like I said,
this is the first step for us- We are adding features to the site to
allow users to comment on/make corrections to existing content/build


learning material together/attribute content to various sources.

Regarding usefulness- our developers, and many others have found it
very effective. But it may not be your style. I will update you when
we've added to community piece so we can put your rants/raves to good
use.

Thanks again,

Elizabeth

Marc Bissonnette

unread,
Jun 13, 2008, 4:51:09 PM6/13/08
to
Elizabeth Barnwell <elizabet...@gmail.com> fell face-first on the
keyboard. This was the result:
news:1174bcbf-242a-4c05...@z66g2000hsc.googlegroups.com:

Elizabeth;

It's not a matter of "style" but of actual syntactical correctness. As has
been pointed out by others, some of your information is actually wrong - as
in, if you students use it, perl will cough up an error and exit.

Some of your terms are wrong, as has also been pointed out: When your users
come looking for help, using (incorrect) terms you've given them, they'll
either not find what they're looking for, or be laughed out of the
discussion. Worse for you, is when someone says "Who the hell told you that
nonsense?" and they point back to your school/site... I'm sure you can see
the potential for negative business growth there.

You *really* should hire a professional to look over your material - It
will save your students a lot of time and effort in the future and save
your business quite a bit of ambarassment.

Good luck.


--
Marc Bissonnette
Looking for a new ISP? http://www.canadianisp.com
Largest ISP comparison site across Canada.

Uri Guttman

unread,
Jun 13, 2008, 8:31:52 PM6/13/08
to
>>>>> "EB" == Elizabeth Barnwell <elizabet...@gmail.com> writes:

EB> Regarding usefulness- our developers, and many others have found it
EB> very effective. But it may not be your style. I will update you when
EB> we've added to community piece so we can put your rants/raves to good
EB> use.

but who judges how well the newbies are learning from this? they can't
judge themselves. this is a classic problem of peer review or the lack
thereof. i have seen many self-declared perl gurus who learned in a
vacuum or from bad sources. and they don't really know perl nor
programming. but they think they do. usually they don't take criticism
well either.

i come down hard on these weak web tutorials because there is good perl
stuff out there (learn.perl.org has a full free book online) and a large
and active perl community ready to provide peer review. did anyone in
your group ask for outside reviewers before it was published? how can
you tell how accurate it is without multiple eyes? even damian conway
with his last book (the excellent perl best practice) had about 20+ tech
reviewers who made the final book so much better.

so consider my comments an outside review. but beyond that, i seriously
doubt you can learn to program at any decent level with just simple
flash cards. there is too much knowledge missing from them and it is so
easy to link to it.

i will not recommend this site to anyone for that main reason.

Ben Bullock

unread,
Jun 13, 2008, 8:36:35 PM6/13/08
to
On Fri, 13 Jun 2008 12:51:58 +0000, Uri Guttman wrote:


> BB> The other problem is that the people who do know enough Perl seem
to
> BB> prefer writing incomprehensible gibberish ("Camel Books",
"perldoc
> BB> perlre", etc.) to writing something that normal people can
understand.
>
> and how much technical writing or editing have you done?

About Perl, none, although I've done enough reading of Perl stuff to know
how badly edited and badly written many of them are. A couple of years or
more ago, I tried and failed to learn about Perl's references by reading
the 3rd edition of the "Camel Book" and "perlreftut". I then went off and
worked it out myself, basically by writing enough code, and by getting
answers on this newsgroup from people like Tad McClellan and Peter
Holzer, and looking at examples, and so on. Then, a few months ago, when
I'd figured it out, I went back and read the "Camel Book" again, and
found that I still couldn't make sense of it, even though I actually
understood the use of Perl's references fairly well at that point.

> >> there could be links to the docs, more info in each answer,
> >> better grouping of questions, etc.
>
> BB> Then they'd be completely inaccessible to beginners.
>
> nope. you can do that very easily. links to the online docs at
> perldoc.perl.org are trivial to make.

I'm talking about whether it's readable or not, not the technical
difficulty of doing it.



> >> Syntax for looping through the values in a list
> >> foreach $var @array {
> >> }
> >>
> >> that should be my $var.
>
> BB> Why, though? Who's to say that $var isn't declared previously?
>
> and then that would be a likely bug. foreach localizes its loop variable
> which would mask the my var. please learn perl before you critique a
> critique of a tutorial
>
> perl -le 'my $x = 1 ; for $x ( 1 .. 3 ) {print $x} print $x'
> 1
> 2
> 3
> 1

If that's your point it's a good one, but that wasn't what you said above.

> >> Operators to add and remove items from the beginning of array
> >> unshift(@array, new_item)
> >> shift(@array)
> >>
> >> what is new_item? unless that is a predeclared sub with a
prototype it
> >> is illegal. and it doesn't mention unshift takes a list.
>
> BB> Oh, yes, that's right, people who are starting to learn something
> BB> don't usually learn all the details at first.
>
> but correct syntax is needed. or an explanation of what 'new_item' is.

Why is correct syntax needed? Seriously - a lot of computer books use
pseudo-code and italics to indicate something is not correct.

> >> nor does it say
> >> which function adds or removes (sure they are in the order
mentioned in
> >> the question but it should be pointed out. the same is true for the
> >> push/pop slide.
>
> BB> Yes, if you don't add more and more details to the explanation, it
> BB> won't be confusing enough for a complete beginner, then they won't
> BB> feel frustrated, give up, and go and learn Python instead.
>
> nope. they would be pissed at the teacher.

I'll take back the above comment - re-reading it I agree with what you
said above.

> >> the slides always say operator for what most call functions. sure
they
> >> are operators in some sense (they don't always need parens) but it
is
> >> poor terminology to always say operator.
>
> BB> Again, unless it's vitally important, tortured details like this
don't
> BB> really belong in explanations for beginners. People can learn the
details
> BB> once they've grasped the concepts more clearly.
>
> nope. correct terminology makes it easier to understand and causes fewer
> problems later on.

I'll take your word for it here, I'm not sure about this issue.

> and you don't get teaching perl or programming languages. sure you start
> simple but the concept of alternate delims is a simple one.

Is it? You're correct that I've never taught anybody Perl, but if I did
I'd expect people to get confused if I just started babbling about
alternate delimiters.

> flash cards are a classic method to learn rote material. they rarely
> require the need to think. as such they are used for tests covering
> finite subject matter. perl is not a finite nor is even a small subset
> that easy to rote learn.

No-one has suggested that people try to learn Perl solely by looking at
these cards, without writing any computer code. These cards are quiz
questions for people who are learning, presumably learning by writing
code.

> programming is more about concepts than
> details. again, you haven't done any training nor writing if you think

> rote learning is a gohttp://library.thinkquest.org/16728/content/cgi/
cplusplus.htmlod way to teach perl.

Who has suggested that rote learning is a good way to teach Perl? Nobody.

> >> What is the syntax for a list literal
> >> ( value1, value2, ....)
> >>
> >> huh? that is a list. literals are possible values in the list.
> >>
> >> What is the effect of using negative number for an array index
> >> it starts counting from the end of the array backwards
> >>
> >> that is from the department of redundant answers department.
>
> BB> Sorry, but I don't see why it is redundant. That seems like a
useful
> BB> piece of knowledge to me. C programmers who used a negative
number in an
> BB> array index would expect to get a crash and a "segmentation
fault" error,
> BB> so why is it redundant to point out that Perl is different from C
here?
>
> hmm, what other direction can you count from the end ot the array?

I disagree. If it actually said "it starts counting from the end of the
array" without the "backwards", that actually would be confusing for the
beginner. A lot of people would imagine that it is going forwards - which
is actually quite possible given that Perl doesn't declare array sizes.

> 50 questions and answers and 1 typo. maybe 3 pages of text. if i saw a
> book with such a ratio i would puke. i have tech edited 4 perl books and
> none had such a ratio of typos.

Nonsense. I've edited stuff written by native speakers of English which
had many more typos. About nine months ago I was working with a guy who
used to brag what a great writer of English he was, and yet he even made
mistakes in things like "it's" and "its". I recently read a John Grisham
novel which had a spelling mistake on nearly every page.

When we get into computer programming, in which it's not intuitively
obvious to most people when there is an error, I'm pretty sure that we
can expect many more small errors. Somewhere on the web there is a list
of errata for Donald Knuth's books "The Art of Computer Programming". You
might know Knuth as "the guy who takes an incredible amount of care over
his books", so much so that he even created a computer typesetting system
for them, and it might be instructive to have a gander at the list of
errors that slipped through into his books before one starts proclaiming
about how error-free most tech books are compared to these flashcards.

> poor writing and little editing is
> obvious here.

There are some problems with the cards - let's see whether they get fixed
or not.

> and when you declare my @array or %hash, what does it contain initially?
> arrays and hashes are variables too. and should be covered as much if
> not more than scalars

But the beginner starts off with $x = "Hallo World".

> BB> There are ways to phrase things so that they are easy to
understand and
> BB> also not incorrect.
>
> >> Comparison operator for numbers
> >> ==
> >>
> >> hmm, i wonder what >, <, >= and <= have to say about that?
> >> s/Comparison/Equality/
>
> BB> As far as I know, the comparison operator for numbers is <=>.
>
> so you think the q/a is wrong too!

Yes, certainly - the comparison operator is <=>, so if the question says
"what is the comparison operator?" I would say "<=>" and then I'd be
annoyed if it said "==" was the correct answer.

> >> How are all numbers stored interally by Perl
> >> double-precision floating-point values
> >>
> >> hmm, i wonder what IV's have to say about that?
>
> BB> The question is a bit weird, I don't know how numbers are stored
> BB> internally by Perl.
>
> then why is it being asked? and why would you think it is important or
> not? why did you comment?

To correctly answer the question of how Perl's numbers are stored would
involve a knowledge of Perl's internals which I wouldn't expect a
beginner to have - thus the question is a bit weird. I don't know how the
numbers are stored either - is it a C struct or a union or something
else? I don't know the answer & I wouldn't expect beginners to either.

> a few? this was 50 questions. i found 15+ mistakes or bad wording. that
> is an awfully high ratio.

It's good to work on improving the mistakes in this kind of tutorial, but
a lot of the corrections you suggest involve cramming more information
into the tutorial. If it's intended for complete beginners, I doubt that
is going to work.

> >> simple questions like these is not the
> >> way to learn programming in any language.
>
> BB> Hmm, I have no idea, but since there are millions of people out
there,

> BB> who knows, perhaps it is usefuhttp://library.thinkquest.org/16728/
content/cgi/cplusplus.htmll for someone. I don't think it's

harmful.
>
> you haven't seen enough bad perl tutorials.

I've seen plenty of nearly incomprehensible Perl tutorials. I'd rather
learn from a tutorial with errors than one I can't understand. To take an
example from C++, since I know C++ better than Perl, here is a totally
bogus tutorial on how to write a C++ CGI program:

http://library.thinkquest.org/16728/content/cgi/cplusplus.html

The code there doesn't even compile, and it contains a lot of stupid
errors. However, I could understand it, so despite the errors it was
enough for me to work out the basics of how to make a C++ CGI program,
and start writing them myself. I don't think tutorials with errors in
them are nearly as harmful as tutorials which one can't understand - what
is going to happen if a learner programmer makes a mistake? Smoke starts
coming out of the computer, or something? Rather I would suggest that you
put a few deliberate mistakes in your tutorials to keep people on their
toes, like "spot the deliberate mistake in this tutorial and win a pizza".

> google for them and then come back.

I'm not sure I want to.

> the harm of them is way beyond your knowledge. ever heard of
> matt's scripts and the damage they caused perl for years?

No, I haven't heard of them and the damage they caused Perl for years.

But I'm sure it's fascinating, with lots of smoke belching out of
computers, tapes whirling forwards and backwards, lights flashing on and
off, and an ever-increasingly high pitched voice screaming "Cannot
compute! Cannot compute!" before the whole of the Star Ship Enterprise is
whisked into a space-time vortex from which only Spock's Vulcan mind-meld
with the damaged electronic device can save the day.

So please tell me the story.

Elizabeth Barnwell

unread,
Jun 13, 2008, 9:10:41 PM6/13/08
to
> enough for me to work out the basics of how to make a C++ CGI...
>
> read more »


Hi Everyone,

I think the key here that I've failed to communicate is that YoYoBrain
is a tool to learn information to help you work more efficiently. The
flashcards that I provided are an example of how to use the tool,
albeit I've come to understand from your feedback, a bad one. I should
have sent a link to a completely generic set of flashcards to get the
point across. These are an example of one person's learning materials-
they are not published in any way and do not aim to be definitive. If
you look at my original post, I was hoping that you would see how
YoYoBrain works, the advantages of using the Learning Wizard to be
drilled on information you want to get a better handle on, give some
feedback on the site as a tool for learning information, and maybe
even find it helpful to use the site for your own learning endeavors-
if that's your style. This is the "style" that I'm talking about, the
learning style of working with flashcards. Our developers have found
it useful, and I wanted to share it with you. Again, eventually, the
goal is to make a community piece that allows people to build
information and learning material together so people with your insight
can help people. Did not mean to offend anyone...

If anyone's interested, I will let you know when we have correction/
comment/editing features up and running.

Best,

Elizabeth

Ben Bullock

unread,
Jun 13, 2008, 9:52:14 PM6/13/08
to
On Fri, 13 Jun 2008 18:10:41 -0700, Elizabeth Barnwell wrote:

> I think the key here that I've failed to communicate is that YoYoBrain
> is a tool to learn information to help you work more efficiently.

But this is a newsgroup about Perl.

> The flashcards that I provided are an example of how to use the tool,
> albeit I've come to understand from your feedback, a bad one.

So it was just spam for your flashcard program.

> I should
> have sent a link to a completely generic set of flashcards to get the
> point across.

No, you should not do that - this newsgroup is only about Perl.

> These are an example of one person's learning materials-
> they are not published in any way and do not aim to be definitive.

Yes, they are - they are published on the WWW, which is a kind of vanity
publishing, but it is publishing.

> If
> you look at my original post, I was hoping that you would see how
> YoYoBrain works, the advantages of using the Learning Wizard to be
> drilled on information you want to get a better handle on, give some
> feedback on the site as a tool for learning information, and maybe
> even find it helpful to use the site for your own learning endeavors-
> if that's your style.

It is not appropriate to post an advertisement for your system here
though.

> This is the "style" that I'm talking about, the
> learning style of working with flashcards. Our developers have found
> it useful, and I wanted to share it with you.

In case you have not noticed, there are many people who want to share
information with us on the internet, such as how to make some parts of
your body larger, or how to get $$$, etc. Because there are so many of
these people, the phenomenon of sharing unsolicitied information to
people at large has now acquired a name, "spam", and it's something that
many people object to.

> Again, eventually, the
> goal is to make a community piece that allows people to build
> information and learning material together so people with your insight
> can help people. Did not mean to offend anyone...
>
> If anyone's interested, I will let you know when we have correction/
> comment/editing features up and running.

If you're not the author of the Perl cards, I recommend that you don't.

Elizabeth Barnwell

unread,
Jun 13, 2008, 10:23:25 PM6/13/08
to

Ahhh, this is not meant to be spam. This is meant to be a resource to
help people, and I regret that it hasn't been received that way. If
you would like to make changes to the cards here you go,
http://www.yoyobrain.com/learner_subjects/accept/1458

Take care,

Elizabeth

Marc Bissonnette

unread,
Jun 14, 2008, 9:15:18 AM6/14/08
to
Elizabeth Barnwell <elizabet...@gmail.com> fell face-first on the
keyboard. This was the result: news:0ac93957-f491-442f-ba40-
37bd34...@p25g2000hsf.googlegroups.com:

Frankly, I didn't get the impression that you were spamming or shilling,
though extra promotion to your company is a side-effect :)

You will find that many perl coders are passionate about the language -
Personally, if you are doing something that will create more of those
people, good on you. There *is* a lot of good advice here (in clpm) - Take
it to heart and keep coming back - More importantly, tell your students
about it, but make sure they also google "How to ask intelligent
questions" - That alone will help their learning process immensely, if they
take it to heart.

Gordon Corbin Etly

unread,
Jun 16, 2008, 2:58:42 AM6/16/08
to
Ben Bullock wrote:
> On Thu, 12 Jun 2008 19:04:46 +0000, Uri Guttman wrote:

> > the problem is that most learning users of perl don't know enough
> > perl or how to teach to explain things correctly and with enough
> > depth and coverage.

> The other problem is that the people who do know enough Perl seem to
> prefer writing incomprehensible gibberish ("Camel Books", "perldoc
> perlre", etc.) to writing something that normal people can understand.

Exactly, this is the general disconnect in this group between the
'experts' and the 'beginners' and thus you've stumbled upon where the
lack of necessary communication lies. It's not unlike a generational
gap.


> > What is the syntax for a list literal
> > ( value1, value2, ....)
> >
> > huh? that is a list. literals are possible values in the list.

Actually, you could say a list is a literal representation of an array,
just as 123 or "abc" are literal representations of primitive scalars
(they are constants and cannot be modified; you put them into the
appropriate variable so that you can modify it as needed.)


> > What is the effect of using negative number for an array index
> > it starts counting from the end of the array backwards
> >
> > that is from the department of redundant answers department.

> Sorry, but I don't see why it is redundant. That seems like a useful
> piece of knowledge to me. C programmers who used a negative number in
> an array index would expect to get a crash and a "segmentation fault"
> error, so why is it redundant to point out that Perl is different
> from C here?

Exactly, this is one of those things that needs to be emphasized more.


> > How do you access an element in an array
> > use [ ]
> > x[3];
> >
> > i see a syntax bug there!

> Agreed, this is an error. If Larry Wall forgot a dollar we'd call it a
> "typo" though. So we've established that there are a few typos in the
> test.

And you've stumbled upon another of the general problems in these neck
of the woods; some people refuse to give the benefit of the doubt and
just assume the worst.


> > What value do variables hold until defined
> > undef
> >
> > hmm. do arrays and hashes hold undef? that should be scalar
> > variables.

Actaully, yes they do:

# perl -e 'my @arr; print int(@arr == undef), "\n"'
1
# perl -e 'my %hash; print int(%hash == undef), "\n"'
1

If you assign actual values before hand then it prints "0\n"


> > How are all numbers stored interally by Perl
> > double-precision floating-point values
> >
> > hmm, i wonder what IV's have to say about that?

> The question is a bit weird, I don't know how numbers are stored
> internally by Perl.

Easy: in RAM ;P


> > How can you run Perl with warnings enabled
> > -e
> > perl -e program_name
> >
> > whoops!! that flash card should be flashing red!
> >
> > so as you can see, this site needs plenty of fixes and editing and
> > it
> > doesn't seem to be too helpful.

> It needs a few fixes. Trying too hard to find fault with it by
> harshly criticising stuff which isn't really broken is
> counterproductive though.

True. While some [better] proof reading would have definitely helped
here, being over critical more often than not will not make one want to
be very receptive of the critisim.


> > simple questions like these is not the
> > way to learn programming in any language.

It certainly isn't useful when people make blanket statements like this,
as you cannot speak for everyone, and that is yet another problem people
like your self have; attempting to portray your point of view as the
dominant one, and that completely ignored all the readers out there who
might see things differently.


> Hmm, I have no idea, but since there are millions of people out there,
> who knows, perhaps it is useful for someone. I don't think it's
> harmful.

As Perl shows us, there are often more than one way to do or see things.


--
G. C. Etly


Randal L. Schwartz

unread,
Jun 16, 2008, 7:45:40 AM6/16/08
to Gordon Corbin Etly
>>>>> "Gordon" == Gordon Corbin Etly <gord...@gmail.com> writes:

Gordon> Actaully, yes they do:

Gordon> # perl -e 'my @arr; print int(@arr == undef), "\n"'
Gordon> 1
Gordon> # perl -e 'my %hash; print int(%hash == undef), "\n"'
Gordon> 1

Gordon> If you assign actual values before hand then it prints "0\n"

No, they don't. You really don't grok this very well, and your
test is flawed.

@arr == undef

would be *precisely* the same as

@arr == 0

since "==" forces both of its arguments to numeric values, and undef
as a number is 0.

And @arr in a scalar context (also forced by ==) says nothing about
the contents of the array, but rather the *length*, in this case 0.

So all you've proven is that an array that has not had anything assigned
in it has 0 elements. I think we knew that already. It says *nothing*
about the "undef" "contents", which even as I type it, boggles me.

"undef" is a scalar concept. An array can contain an undef element,
but it doesn't contain that initially. A hash can contain an undef
value, but not an undef key, and again, doesn't contain undef initially.

So, yes, the original "flash card" is incorrect here, and your explanation
only muddies the issue.

print "Just another Perl hacker,"; # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.

brian d foy

unread,
Jun 16, 2008, 10:10:23 AM6/16/08
to
In article <6bmh95F...@mid.individual.net>, Gordon Corbin Etly
<gord...@gmail.com> wrote:

> > > What is the syntax for a list literal
> > > ( value1, value2, ....)
> > >
> > > huh? that is a list. literals are possible values in the list.
>
> Actually, you could say a list is a literal representation of an array,

No, you can't say that. It's jut a "list literal", as in one that you
type in yourself and you see the actual values. An array is not part of
that. An array can contain a list, but not every list is contained by
an array. It's the difference between data and variables.

Uri Guttman

unread,
Jun 16, 2008, 10:24:56 AM6/16/08
to

randal already proved your lack of array-fu. i will leave it at that.

Gordon Corbin Etly

unread,
Jun 16, 2008, 12:19:55 PM6/16/08
to
Randal L. Schwartz wrote:
>>>>>> "Gordon" == Gordon Corbin Etly <gord...@gmail.com> writes:

> Gordon> Actaully, yes they do:
>
> Gordon> # perl -e 'my @arr; print int(@arr == undef), "\n"'
> Gordon> 1
> Gordon> # perl -e 'my %hash; print int(%hash == undef), "\n"'
> Gordon> 1
>
> Gordon> If you assign actual values before hand then it prints "0\n"

> No, they don't. You really don't grok this very well, and your
> test is flawed.

See below for the code I should of used.


> @arr == undef
>
> would be *precisely* the same as
>
> @arr == 0
>
> since "==" forces both of its arguments to numeric values, and undef
> as a number is 0.

Are you sure about that? undef is supposed to be seprate than 0 or '',
so it seems a little odd == wouldn't know the difference. Though you can
just use defined() like I did below.


> And @arr in a scalar context (also forced by ==) says nothing about
> the contents of the array, but rather the *length*, in this case 0.

Ok, you're right about the forcing of scalar context.


Here is what I should of written:

# perl -e 'my @arr; print int(defined(@arr)), "\n"'
0


Now take this:

# perl -e 'my @arr = (123); print int(defined(@arr)), "\n"'
1


So @arr *is* undefined until it's, well, defined. Same goes for a hash.


> So all you've proven is that an array that has not had anything
> assigned in it has 0 elements. I think we knew that already. It
> says *nothing* about the "undef" "contents", which even as I type it,
> boggles me.

See above; scalar, array, hash, they are defined until they are, well,
defined, so until then, they are undef. I'm not sure when this suddenly
became a lost mystery.


> "undef" is a scalar concept. An array can contain an undef element,
> but it doesn't contain that initially. A hash can contain an undef
> value, but not an undef key, and again, doesn't contain undef
> initially.

Then why does defined() return false until the array or hash are
defined?


> So, yes, the original "flash card" is incorrect here, and your
> explanation only muddies the issue.


How is it wrong?

" > > What value do variables hold until defined
" > > undef

Variables *are* undefined until they are, well, you know, _defined_. :)

I would of used a different wording, though, than "What value do
variables hold", but it's not really wrong either.


--
G. C. Etly


Gordon Corbin Etly

unread,
Jun 16, 2008, 12:25:41 PM6/16/08
to
brian d foy wrote:
> In article <6bmh95F...@mid.individual.net>, Gordon Corbin Etly
> <gord...@gmail.com> wrote:

> > > > What is the syntax for a list literal
> > > > ( value1, value2, ....)
> > > >
> > > > huh? that is a list. literals are possible values in the list.

> > Actually, you could say a list is a literal representation of an
> > array,

> No, you can't say that. It's jut a "list literal", as in one that you
> type in yourself and you see the actual values.

Ok, "list literal", doesn't seem quote right. A list is a list. What an
array hold's is a list. Just like a scalar holds 123 or "abc". How is
qw/a 2 c 3 e/ any different?

Consider: [1, 2, 3]

That is a list in an anonymous array. The list is the literal
representation of the array.

Just like in c or C++

int arr[5] = {1, 2, 3, 4, 5};

This was always considered the literal form of arr[0]=1; arrar[1]=2;
...

So how is my @arr = (1, 2, 3, 4 ,5); any different that that?


--
G. C. Etly


Gordon Corbin Etly

unread,
Jun 16, 2008, 12:27:30 PM6/16/08
to
Uri Guttman wrote:
> randal already proved your lack of array-fu. i will leave it at that.

And I posted a better example (admittedly my first one was indeed
flawed.) I how ever am no lacking in the manner you describe. However,
I'm at a loss as to why you made such a pointless reply.


--
G. C. Etly


A. Sinan Unur

unread,
Jun 16, 2008, 1:18:43 PM6/16/08
to
"Gordon Corbin Etly" <gord...@gmail.com> wrote in news:6bni5cF3d330cU1
@mid.individual.net:

> See below for the code I should of used.

s/should of/should have/

...

> Here is what I should of written:

Ditto


>
> # perl -e 'my @arr; print int(defined(@arr)), "\n"'
> 0
>
>
> Now take this:

No, you take this:

C:\> perl -we "my @arr; print int(defined(@arr)), qq{\n}"
defined(@array) is deprecated at -e line 1.
(Maybe you should just omit the defined()?)
0

perldoc -f defined


Use of "defined" on aggregates (hashes and arrays) is
deprecated. It used to report whether memory for that aggregate
has ever been allocated. This behavior may disappear in future
versions of Perl. You should instead use a simple test for size:

if (@an_array) { print "has array elements\n" }
if (%a_hash) { print "has hash members\n" }

*Sigh*

*PLONK*

Sinan

--
A. Sinan Unur <1u...@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Jürgen Exner

unread,
Jun 16, 2008, 1:34:03 PM6/16/08
to
"Gordon Corbin Etly" <gord...@gmail.com> wrote:

Trying yet another ID besides
<g...@bentsys.com>
<ge...@bentsys-INVALID.com>
<g.e...@bent-INVALID-sys.com>
<g.e...@bentsys.INVALID.com>
<.@.invalid>
<g...@e.nvalid>
<g...@e.nvalid>

>Randal L. Schwartz wrote:
>Here is what I should of written:
> # perl -e 'my @arr; print int(defined(@arr)), "\n"'
> 0
>
>Now take this:
>
> # perl -e 'my @arr = (123); print int(defined(@arr)), "\n"'
> 1
>
>So @arr *is* undefined until it's, well, defined. Same goes for a hash.

Which part don't you understand (from perldoc -f defined)?


Use of "defined" on aggregates (hashes and arrays) is
deprecated. It used to report whether memory for that
aggregate
has ever been allocated. This behavior may disappear in
future
versions of Perl.


Adjusting killfile once again.

jue

comp.llang.perl.moderated

unread,
Jun 16, 2008, 1:37:29 PM6/16/08
to
On Jun 16, 9:19 am, "Gordon Corbin Etly" <gord....@gmail.com> wrote:
> Randal L. Schwartz wrote:


Because defined()'s meaning gets twisty
when dealing with arrays/hashes. Until
memory's been allocated, defined() will
be false but then remain true even if it
gets emptied again:

$ perl -le '@a=(1);print defined @a;@a=();
print defined @a'
1
1

perldoc -q empty

Why does defined() return true on empty
arrays and hashes?

The short story is that you should probably
only use defined on scalars or functions, not
on aggregates (arrays and hashes). See
"defined" in perlfunc in the 5.004 release
or later of Perl for more detail.

perldoc -f defined

Use of "defined" on aggregates (hashes and
arrays) is deprecated. It used to report
whether memory for that aggregate has ever
been allocated. This behavior may disappear
in future versions of Perl.


--
Charles DeRykus

Uri Guttman

unread,
Jun 16, 2008, 5:54:12 PM6/16/08
to
>>>>> "GCE" == Gordon Corbin Etly <gord...@gmail.com> writes:

GCE> Uri Guttman wrote:
>> randal already proved your lack of array-fu. i will leave it at that.

GCE> And I posted a better example (admittedly my first one was indeed
GCE> flawed.) I how ever am no lacking in the manner you describe. However,
GCE> I'm at a loss as to why you made such a pointless reply.

because your comments overall were pointless and as randal showed also
had errors. you proved my point that to teach perl you need to know it
very well and also how to express questions and answers that teach
knowledge and not rote facts. randal has both of those in spades. i
claim to have a modicum of them, enough to keep doing more of it. you on
the other hand just flame about other posters and their posting style
and the few times you talk perl, you are just as likely to be wrong as
right.

just some musings as i crash and burn at yapc. why aren't you here
learning more perl?

Uri Guttman

unread,
Jun 16, 2008, 5:57:02 PM6/16/08
to
>>>>> "GCE" == Gordon Corbin Etly <gord...@gmail.com> writes:

GCE> Here is what I should of written:

GCE> # perl -e 'my @arr; print int(defined(@arr)), "\n"'
GCE> 0


that is even worse. defined on an aggregate tells you if the variable
had EVER been allocated before, not whether it has any elements. google
for aggregate, defined and my name for threads on this subject.

GCE> Now take this:

GCE> So @arr *is* undefined until it's, well, defined. Same goes for a hash.

nope. you don't get it.

GCE> See above; scalar, array, hash, they are defined until they are, well,
GCE> defined, so until then, they are undef. I'm not sure when this suddenly
GCE> became a lost mystery.

@array = () is defined but empty. defined on aggregates is meaningless
and useless.

read past threads on this. learn something.

Gordon Corbin. Etly

unread,
Jun 16, 2008, 6:03:37 PM6/16/08
to
A. Sinan Unur wrote:
> "Gordon Corbin Etly" <gord...@gmail.com> wrote in
> news:6bni5cF3d330cU1 @mid.individual.net:

> > See below for the code I should of used.

> s/should of/should have/

> ...

> > Here is what I should of written:

> Ditto

> > # perl -e 'my @arr; print int(defined(@arr)), "\n"'
> > 0
> >
> >
> > Now take this:

> No, you take this:

You seem to have some anger issues. My post was not hostile in any way
so I don't know why you are so.


> C:\> perl -we "my @arr; print int(defined(@arr)), qq{\n}"
> defined(@array) is deprecated at -e line 1.
> (Maybe you should just omit the defined()?)
> 0

Maybe it's depreciated, but it still serves to illustrate the point that
the array or hash, before being initialized, are undefined in any sense
of the word. So maybe it's not literally "undef", it might as well be.


> perldoc -f defined
>
>
> Use of "defined" on aggregates (hashes and arrays) is
> deprecated. It used to report whether memory for that aggregate
> has ever been allocated. This behavior may disappear in future
> versions of Perl. You should instead use a simple test for size:
>
> if (@an_array) { print "has array elements\n" }
> if (%a_hash) { print "has hash members\n" }

Why are they removing this behavior? It seems logical that defined()
should return false on anything that hasn't yet be defined, no?


> *Sigh*
>
> *PLONK*

I really think you need some anger management classes; this is not how
one conducts a civil conversation.


--
G. C. Etly


Gordon Corbin. Etly

unread,
Jun 16, 2008, 6:16:14 PM6/16/08
to
Jürgen Exner wrote:
> "Gordon Corbin Etly" <gord...@gmail.com> wrote:

> Trying yet another ID besides

1) An email address is not an id. A person's name identifies who you
are. It's your name. I have never posted under a different name
identification.

2) None of this is relevant to the conversation.


> > Randal L. Schwartz wrote:
> > Here is what I should of written:
> > # perl -e 'my @arr; print int(defined(@arr)), "\n"'
> > 0
> >
> > Now take this:
> >
> > # perl -e 'my @arr = (123); print int(defined(@arr)), "\n"'
> > 1
> >
> > So @arr *is* undefined until it's, well, defined. Same goes for a
> > hash.

> Which part don't you understand (from perldoc -f defined)?
> Use of "defined" on aggregates (hashes and arrays) is
> deprecated. It used to report whether memory for that
> aggregate has ever been allocated. This behavior may
> disappear in future versions of Perl.

Whether it is depercated is not what the point was about. It was whether
it is logicla or not to consider /anything/ that hasn't yet been defined
to be undefined. Maybe nto literally "undef" but it seem hashes and
arrays might as well be. And why exactly is defined() being deprecated?


--
G. C. Etly


Gordon Corbin. Etly

unread,
Jun 16, 2008, 6:18:37 PM6/16/08
to
comp.llang.perl.moderated wrote:

> On Jun 16, 9:19 am, "Gordon Corbin Etly" wrote:

> > Then why does defined() return false until the array or hash are
> > defined?

> Because defined()'s meaning gets twisty
> when dealing with arrays/hashes. Until
> memory's been allocated, defined() will
> be false but then remain true even if it
> gets emptied again:

If it's emptied after it's been defined already, isn't that kind of like
making a string "", and thus, still defined? If so, then that behavior
seems to make sense.


--
G. C. Etly


Keith Keller

unread,
Jun 16, 2008, 7:07:42 PM6/16/08
to
On 2008-06-16, Gordon Corbin. Etly <gord.RE...@gmail.com> wrote:
> Jürgen Exner wrote:
>> "Gordon Corbin Etly" <gord...@gmail.com> wrote:
>
>> Trying yet another ID besides
>
> 1) An email address is not an id. A person's name identifies who you
> are. It's your name. I have never posted under a different name
> identification.

Except "Gordon Etly", no middle name. Clearly you're morphing in an
attempt to avoid killfiles; if you were merely attempting to avoid
spammers, you'd morph your email address but keep your so-called id.

Please, clpmisc readers, please don't feed this troll!

--keith

--
kkeller...@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

szr

unread,
Jun 16, 2008, 7:29:57 PM6/16/08
to
Uri Guttman wrote:
>>>>>> "GCE" == Gordon Corbin Etly <gord...@gmail.com> writes:
>
>> Here is what I should of written:
>
>> # perl -e 'my @arr; print int(defined(@arr)), "\n"'
>> 0
>
>
> that is even worse. defined on an aggregate tells you if the variable
> had EVER been allocated before

This is how I'd expect a function like defined to behave, wouldn't you?

>> Now take this:


>
>> So @arr *is* undefined until it's, well, defined. Same goes for a
>> hash.
>
> nope. you don't get it.

I would like to know how is it wrong? It makes perfect sense to me.

>> See above; scalar, array, hash, they are defined until they are,

>> well, defined, so until then, they are undef. I'm not sure when this
>> suddenly became a lost mystery.


>
> @array = () is defined but empty. defined on aggregates is meaningless
> and useless.

I disagree that it's useless. To me it behaves as expected; if was
defined in any way since the point from which it was declared, then I
would expect defined to return true, else false if it hasn't been
defined yet, or explicitly undefined by using undef().

--
szr


Gordon Corbin Etly

unread,
Jun 16, 2008, 7:38:20 PM6/16/08
to
Uri Guttman wrote:
>>>>>> "GCE" == Gordon Corbin Etly <gord...@gmail.com> writes:
>
> > Uri Guttman wrote:

...

> you on the other hand just flame about other posters and their posting

This is a bold faced lie. I have made comments, as anyone has the right
to do, but it's the likes of you that do any flaming in retaliation like
a child having a tantrum after being criticized or his friend being
criticized. Is it any wonder that any time I enter a conversation it's
people like you who turn anything I say upside down when all I was doing
was attempting to conduct civil conversation?


> style and the few times you talk perl, you are just as likely to be
> wrong as right.

Another false generalization. You do not know me nor my knowledge of
Perl. I really wish you'd stop with your personal vendetta and character
assassination attempts just because you don't agree with the way I write
things.


> just some musings as i crash and burn at yapc. why aren't you here
> learning more perl?

Like many people I've been using Perl for many many years and learning
is something I never stop doing.


--
G. C. Etly


Uri Guttman

unread,
Jun 16, 2008, 7:48:14 PM6/16/08
to
>>>>> "GCE" == Gordon Corbin Etly <gremove...@gmail.com> writes:

GCE> Uri Guttman wrote:
>>>>>>> "GCE" == Gordon Corbin Etly <gord...@gmail.com> writes:
>>
>> > Uri Guttman wrote:

GCE> ...

>> you on the other hand just flame about other posters and their posting

GCE> This is a bold faced lie. I have made comments, as anyone has the
GCE> right to do, but it's the likes of you that do any flaming in
GCE> retaliation like a child having a tantrum after being criticized
GCE> or his friend being criticized. Is it any wonder that any time I
GCE> enter a conversation it's people like you who turn anything I say
GCE> upside down when all I was doing was attempting to conduct civil
GCE> conversation?

nyah! nyah! nyah!

>> style and the few times you talk perl, you are just as likely to be
>> wrong as right.

GCE> Another false generalization. You do not know me nor my knowledge
GCE> of Perl. I really wish you'd stop with your personal vendetta and
GCE> character assassination attempts just because you don't agree
GCE> with the way I write things.

it isn't personal. it is a professional vendetta. i help get people perl
jobs. i need to know perl and people. you are neither a perl nor a
people.

>> just some musings as i crash and burn at yapc. why aren't you here
>> learning more perl?

GCE> Like many people I've been using Perl for many many years and learning
GCE> is something I never stop doing.

years of perl and you didn't know about arrays and undef? or defined?
you might want to find a better teacher. of course i won't be that one
as i teach those that want to learn.

Uri Guttman

unread,
Jun 16, 2008, 7:49:25 PM6/16/08
to
>>>>> "s" == szr <sz...@szromanMO.comVE> writes:

s> Uri Guttman wrote:
>>>>>>> "GCE" == Gordon Corbin Etly <gord...@gmail.com> writes:
>>
>>> Here is what I should of written:
>>
>>> # perl -e 'my @arr; print int(defined(@arr)), "\n"'
>>> 0
>>
>>
>> that is even worse. defined on an aggregate tells you if the variable
>> had EVER been allocated before

s> This is how I'd expect a function like defined to behave, wouldn't you?

>>> Now take this:
>>
>>> So @arr *is* undefined until it's, well, defined. Same goes for a
>>> hash.
>>
>> nope. you don't get it.

s> I would like to know how is it wrong? It makes perfect sense to me.

>>> See above; scalar, array, hash, they are defined until they are,
>>> well, defined, so until then, they are undef. I'm not sure when this
>>> suddenly became a lost mystery.
>>
>> @array = () is defined but empty. defined on aggregates is meaningless
>> and useless.

s> I disagree that it's useless. To me it behaves as expected; if was
s> defined in any way since the point from which it was declared, then I
s> would expect defined to return true, else false if it hasn't been
s> defined yet, or explicitly undefined by using undef().

as i said, google for threads on agregates and defined. plenty said
already and i won't repeat it again.

Uri Guttman

unread,
Jun 16, 2008, 7:51:26 PM6/16/08
to
>>>>> "GCE" == Gordon Corbin Etly <gord.RE...@gmail.com> writes:

>> C:\> perl -we "my @arr; print int(defined(@arr)), qq{\n}"
>> defined(@array) is deprecated at -e line 1.
>> (Maybe you should just omit the defined()?)
>> 0

GCE> Maybe it's depreciated, but it still serves to illustrate the
GCE> point that the array or hash, before being initialized, are
GCE> undefined in any sense of the word. So maybe it's not literally
GCE> "undef", it might as well be.

do you know what DEPRECATED means? it ain't depreciated. caps were used
to help the learning handicapped.

GCE> Why are they removing this behavior? It seems logical that defined()
GCE> should return false on anything that hasn't yet be defined, no?

you don't get it. perhaps you never will. will you google and learn?
will you learn to google? or do you need goggles? or do you gurgle?

GCE> I really think you need some anger management classes; this is not how
GCE> one conducts a civil conversation.

you need learning glasses (sic).

Martien Verbruggen

unread,
Jun 16, 2008, 8:04:07 PM6/16/08
to
On Sun, 15 Jun 2008 23:58:42 -0700,

Gordon Corbin Etly <gord...@gmail.com> wrote:
> Ben Bullock wrote:
>
> Actaully, yes they do:
>
> # perl -e 'my @arr; print int(@arr == undef), "\n"'
> 1
> # perl -e 'my %hash; print int(%hash == undef), "\n"'
> 1

These is not the correct tests.

You're putting an array in a scalar context, where it evaluates to 0
(because the number of elements is 0, and an array in scalar context
evaluates to the number of elements it contains). You're treating undef
in a numerical context, where it evaluates to 0, and if you enabled
warnings, you'd be told that's what's happening. Since 0 equals 0, that
ends up being true.

A hash in scalar context evaluates to 0 (formally: false) if it has no
elements, and to #used_buckets/#allocated_buckets (formally: true)
otherwise. (1) The 'formally' bits indicate that those values should
only be used to est truthness.

See the perldata documentation for more details on this.

Try these (taking into account that they're really meaningless):

$ perl -le 'my @foo; print "yep" if defined @foo'
$ perl -le 'my %foo; print "yep" if defined %foo'

Note that if you enable warnings you'll be told that defined on an
aggregate is deprecated. The reason for this is that it is meaningless,
as an aggregate cannot be defined or undefined.

> If you assign actual values before hand then it prints "0\n"

I hope it's now clear why, and that it has nothing to do with
definedness of the aggregates.

Martien
--
|
Martien Verbruggen | life ain't fair, but the root password helps.
| -- BOFH
|

Gordon Corbin Etly

unread,
Jun 16, 2008, 9:01:31 PM6/16/08
to
Keith Keller wrote:
> On 2008-06-16, Gordon Corbin. Etly <gord.RE...@gmail.com> wrote:
> > Jürgen Exner wrote:
> > > "Gordon Corbin Etly" <gord...@gmail.com> wrote:

> > > Trying yet another ID besides

> > 1) An email address is not an id. A person's name identifies who you
> > are. It's your name. I have never posted under a different name
> > identification.

> Except "Gordon Etly", no middle name.

It's the same name. I have never tried using a different name than my
own. Many people change the way they write their name, and I've never
seen anyone make such a fuss about it.


> Clearly you're morphing in an attempt to avoid killfiles;

Not so much avoiding killfiles, but to annoy those who use their
killfiles in order to get the last word and then attempt to block you
out. Why should I give people who act that way a free pass and conform
to /their/ demands when it's they who are in the wrong?


> if you were merely attempting to avoid spammers, you'd morph your
> email address but keep your so-called id.

That's exactly what I have been doing. *sigh*


--
G. C. Etly


Gordon Corbin Etly

unread,
Jun 16, 2008, 11:24:24 PM6/16/08
to
Uri Guttman wrote:
>>>>>> "GCE" == Gordon Corbin Etly <gord.RE...@gmail.com> writes:

> > > C:\> perl -we "my @arr; print int(defined(@arr)), qq{\n}"
> > > defined(@array) is deprecated at -e line 1.
> > > (Maybe you should just omit the defined()?)
> > > 0

> > Maybe it's depreciated, but it still serves to illustrate the


> > point that the array or hash, before being initialized, are

> > undefined in any sense of the word. So maybe it's not literally

> > "undef", it might as well be.

> do you know what DEPRECATED means? it ain't depreciated. caps were
> used to help the learning handicapped.

Do you really have to insult people over a silly typo? Is it possible
for you to carry a civil conversation?


> > Why are they removing this behavior? It seems logical that defined()

> > should return false on anything that hasn't yet be defined, no?

> you don't get it. perhaps you never will. will you google and learn?
> will you learn to google? or do you need goggles? or do you gurgle?

What get what? You seem to be scared to stick to the actual points and
generate an actual constructive response, rather than insulting the
other party because you either don't agree with or you're incapable of
seeing a differing point of view on something you may be knowledgeable
about.

Oh, and I gurgle Listerine in the morning. Google is for the rest of the
day.


> > I really think you need some anger management classes; this is not

> > how one conducts a civil conversation.

> you need learning glasses (sic).

So much for civil discussion.... I see you are not capable of that...

Gordon Corbin Etly

unread,
Jun 16, 2008, 11:49:29 PM6/16/08
to
Uri Guttman wrote:

>>>>>> "GCE" == Gordon Corbin Etly <gremove...@gmail.com> writes:
> > Uri Guttman wrote:
> >>>>>>> "GCE" == Gordon Corbin Etly <gord...@gmail.com> writes:
> > > > Uri Guttman wrote:

> > > you on the other hand just flame about other posters and their
> > > posting

> > This is a bold faced lie. I have made comments, as anyone has the


> > right to do, but it's the likes of you that do any flaming in

> > retaliation like a child having a tantrum after being criticized

> > or his friend being criticized. Is it any wonder that any time I

> > enter a conversation it's people like you who turn anything I say

> > upside down when all I was doing was attempting to conduct civil

> > conversation?

> nyah! nyah! nyah!

Thank you for the mature and caring response. I wish everyone was just
like you...


> > > style and the few times you talk perl, you are just as likely to
> > > be wrong as right.

> > Another false generalization. You do not know me nor my knowledge


> > of Perl. I really wish you'd stop with your personal vendetta and

> > character assassination attempts just because you don't agree

> > with the way I write things.

> it isn't personal. it is a professional vendetta. i help get people
> perl jobs. i need to know perl and people. you are neither a perl nor
> a people.

"a perl" ??!

Why are you making blind assumptions? I happen to know Perl quite well,
and I hope that when you get someone a job you at least write the name
of the language as a proper noun.


> > > just some musings as i crash and burn at yapc. why aren't you here
> > > learning more perl?

> > Like many people I've been using Perl for many many years and
> > learning is something I never stop doing.

> years of perl and you didn't know about arrays and undef? or defined?

Why are you assuming I didn't know about that? I was attempting to make
civil discussion about a point stemming from Ben Bullock's comments
which I still believe has some validity.


> you might want to find a better teacher. of course i won't be
> that one as i teach those that want to learn.

My university didn't have Perl in it's curriculum, and most of my
technical and programing knowledge came from good old fashioned self
learning by using documnetation, online resources, man/info/help etc,
trial and error, testing things out, building my own systems and
applications, using avilable tools. Also, reading various message boards
and groups and occasionally asking questions, and when I did go through
colledge I was quite a ways ahead of most people because of it.

Oh yeah, If I didn't want to learn, I wouldn't be where I am right now -
I do lots of technical contract work, am financially independent. I have
the complete freedom to make up my own schedules rather be tied to a 5-9
schedule. Does this sound like someone who doesn't want to learn?

Or maybe you should stop pretending you know someone and make an ass of
your self by insulting them every chance you get.


--
G. C. Etly


szr

unread,
Jun 16, 2008, 11:58:27 PM6/16/08
to
Uri Guttman wrote:
>>>>>> "s" == szr <sz...@szromanMO.comVE> writes:
>
> s> Uri Guttman wrote:
[...]

> >>> See above; scalar, array, hash, they are defined until they are,
> >>> well, defined, so until then, they are undef. I'm not sure when
> >>> this uddenly became a lost mystery.

> >>
> >> @array = () is defined but empty. defined on aggregates is
> >> meaningless >> and useless.
>
> s> I disagree that it's useless. To me it behaves as expected; if was
> s> defined in any way since the point from which it was declared,
> s> then I would expect defined to return true, else false if it
> s> hasn't been defined yet, or explicitly undefined by using undef().

>
> as i said, google for threads on agregates and defined. plenty said
> already and i won't repeat it again.

But you didn't really address my reply. I will look up that thread, but
could you at least comment on why that behavior is not what one would
expect? Like I said, defined() returning false for any array or hash
that hasn't been yet defined makes sense to me. I just don't see why
that behavior is being removed if it isn't hurting anything.

--
szr


Uri Guttman

unread,
Jun 17, 2008, 12:48:06 AM6/17/08
to
>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:

GCE> Why are you making blind assumptions? I happen to know Perl quite well,
GCE> and I hope that when you get someone a job you at least write the name
GCE> of the language as a proper noun.

my cat knows perl better than you. and she is a dumb cat!

>> years of perl and you didn't know about arrays and undef? or defined?

GCE> Why are you assuming I didn't know about that? I was attempting to make
GCE> civil discussion about a point stemming from Ben Bullock's comments
GCE> which I still believe has some validity.

nope. you made wrong statements about arrays and defined. then you tried
to back them up when the docs said you were wrong. not only don't you
know perl, you don't know when to stop babbling on when you are wrong.

tell me what this will print before you run it. and after you run it
please come back and beg forgiveness for your thickheadedness on why
defined makes no sense on arrays.

use strict ;
use warnings ;

foreach ( 1 .. 3 ) {

my @array ;
print "defined $_\n" if defined @array ;
print "empty $_\n" unless @array ;
@array = (1) ;
}
GCE> My university didn't have Perl in it's curriculum, and most of my
GCE> technical and programing knowledge came from good old fashioned
GCE> self learning by using documnetation, online resources,
GCE> man/info/help etc, trial and error, testing things out, building
GCE> my own systems and applications, using avilable tools. Also,
GCE> reading various message boards and groups and occasionally asking
GCE> questions, and when I did go through colledge I was quite a ways
GCE> ahead of most people because of it.

and i went to college before perl was created. so what?? i was also self
taught in perl. so what? i haven't take a programming class in 30 years?
so what? i train perl developers. that's what.

GCE> Oh yeah, If I didn't want to learn, I wouldn't be where I am
GCE> right now - I do lots of technical contract work, am financially
GCE> independent. I have the complete freedom to make up my own
GCE> schedules rather be tied to a 5-9 schedule. Does this sound like
GCE> someone who doesn't want to learn?

your act is of someone who thinks they know more than they do. that is
obnoxious to an extreme. you make mistakes here (which isn't the
problem) but you don't accept feedback nor own up to them. that is the
problem. if the p5p think defined is bad enough on aggregates to
deprecate it (NOT DEPRECIATE IT! did you learn english in college?) then
you would think they know more about perl than you do. yet you defend a
broken concept without even understanding it well. let's see the result
you think you get from the above code.

GCE> Or maybe you should stop pretending you know someone and make an
GCE> ass of your self by insulting them every chance you get.

i don't pretend to know you. you are clear by your actions and poor perl
skills here. how about you paste some of your best paid perl work. i
won't have to work hard to shred it. go ahead, i triple dog dare ya!!
and if you want shred mine, be my guest. i always am open to
constructive feedback. my cpan id is URI and there is plenty of code there.

i will be waiting in the center of town at high noon!

Uri Guttman

unread,
Jun 17, 2008, 12:48:46 AM6/17/08
to
>>>>> "s" == szr <sz...@szromanMO.comVE> writes:

>> as i said, google for threads on agregates and defined. plenty said
>> already and i won't repeat it again.

s> But you didn't really address my reply. I will look up that thread, but
s> could you at least comment on why that behavior is not what one would
s> expect? Like I said, defined() returning false for any array or hash
s> that hasn't been yet defined makes sense to me. I just don't see why
s> that behavior is being removed if it isn't hurting anything.

see my example in a reply to the gordon troll. it will show you why.

Uri Guttman

unread,
Jun 17, 2008, 12:50:51 AM6/17/08
to
>>>>> "GCE" == Gordon Corbin Etly <gremove...@gmail.com> writes:

GCE> Uri Guttman wrote:
>>>>>>> "GCE" == Gordon Corbin Etly <gord.RE...@gmail.com> writes:

>> > > C:\> perl -we "my @arr; print int(defined(@arr)), qq{\n}"
>> > > defined(@array) is deprecated at -e line 1.
>> > > (Maybe you should just omit the defined()?)
>> > > 0

>> > Maybe it's depreciated, but it still serves to illustrate the
>> > point that the array or hash, before being initialized, are
>> > undefined in any sense of the word. So maybe it's not literally
>> > "undef", it might as well be.

>> do you know what DEPRECATED means? it ain't depreciated. caps were
>> used to help the learning handicapped.

GCE> Do you really have to insult people over a silly typo? Is it possible
GCE> for you to carry a civil conversation?

typo? it is an entirely different word. and you did it again in another
post. this isn't a typo then.

GCE> So much for civil discussion.... I see you are not capable of that...
GCE> *sigh*

i am civil with civil warriors. or with civil lawyers. or with the
civil liberties union. i am not civil with fools.

Gordon Corbin Etly

unread,
Jun 17, 2008, 1:02:34 AM6/17/08
to
Uri Guttman wrote:

>>>>>> "GCE" == Gordon Corbin Etly <gremove...@gmail.com> writes:

>> Uri Guttman wrote:
> >>>>>>> "GCE" == Gordon Corbin Etly <gord.RE...@gmail.com>
> writes:

> > > > > C:\> perl -we "my @arr; print int(defined(@arr)), qq{\n}"
> > > > > defined(@array) is deprecated at -e line 1.
> > > > > (Maybe you should just omit the defined()?)
> > > > > 0

> > > > Maybe it's depreciated, but it still serves to illustrate the
> > > > point that the array or hash, before being initialized, are
> > > > undefined in any sense of the word. So maybe it's not literally
> > > > "undef", it might as well be.

> > > do you know what DEPRECATED means? it ain't depreciated. caps were
> > > used to help the learning handicapped.

> > Do you really have to insult people over a silly typo? Is it
> > possible


> > for you to carry a civil conversation?

> typo? it is an entirely different word. and you did it again in
> another post. this isn't a typo then.

So now you're the keeper of what is and isn't a typo? Give it a break.

It was a typo, one I didn't even realize I was making. Why does the fate
of the world suddenly hinge on it? I have been in and out quote a bit
today, so excuse me for making such an Earth shattering error.


> > So much for civil discussion.... I see you are not capable of
> > that...

> > *sigh*

> i am civil with civil warriors. or with civil lawyers. or with the
> civil liberties union. i am not civil with fools.

You're not civil period. You stoop to childish name calling and you're
not adding anything to the thread. You're a pompous old fool who get see
passed more than 3 meters in front of them and seems to believe he is
god's gift to the Perl community.

Grow the bloody hell up, go fly a kite and get laid. Stop waiting
everyone's time with your pointless insulting drivel that only serves
your own need to push people down.

--
G. C. Etly


Jim Cochrane

unread,
Jun 17, 2008, 1:29:41 AM6/17/08
to
On 2008-06-16, Gordon Corbin. Etly <gord.RE...@gmail.com> wrote:
> A. Sinan Unur wrote:
>> "Gordon Corbin Etly" <gord...@gmail.com> wrote in
>> news:6bni5cF3d330cU1 @mid.individual.net:
>
>> > See below for the code I should of used.
>
>> s/should of/should have/
>
>> ...
>
>> > Here is what I should of written:
>
>> Ditto
>
>> > # perl -e 'my @arr; print int(defined(@arr)), "\n"'
>> > 0
>> >
>> >
>> > Now take this:
>
>> No, you take this:
>
> You seem to have some anger issues. My post was not hostile in any way
> so I don't know why you are so.
>
>
>> C:\> perl -we "my @arr; print int(defined(@arr)), qq{\n}"
>> defined(@array) is deprecated at -e line 1.
>> (Maybe you should just omit the defined()?)
>> 0
>
> Maybe it's depreciated, but it still serves to illustrate the point that
> the array or hash, before being initialized, are undefined in any sense
> of the word. So maybe it's not literally "undef", it might as well be.

Following along in this thread, I just read the 'defined' manual page,
including the section quoted below. The way I read it, the implication
is that an array or hash table declared but not explicitly initialized is
implicitly initialized to an empty array (or hash). E.g.:


#!/usr/bin/perl

use strict;
use warnings;

my @x;

print "The size of array x is: " . scalar @x . "\n";

push @x, 1;

print "The size of array x is: " . scalar @x . "\n";

[output:

The size of array x is: 0
The size of array x is: 1

In other words, it behaves the same as if the declaration of @x was:
my @x = ();
]

If you add this line:

print "The size of undef is: " . scalar (undef) . "\n";
# This, of course, gives you a runtime error - I think 'scalar' is not really
# necessary above - behaves the same either way.

You get (including stderr):

Use of uninitialized value in concatenation (.) or string at /tmp/arr.pl line 14.
The size of array x is: 0
The size of array x is: 1
The size of undef is:

I.e., if an array in such as case was 'undef', I believe you'd get the same
error as you do trying to print 'undef'.

Jim Cochrane

unread,
Jun 17, 2008, 1:31:58 AM6/17/08
to
On 2008-06-17, Gordon Corbin Etly <gremove...@gmail.com> wrote:
> Uri Guttman wrote:
>>>>>>> "GCE" == Gordon Corbin Etly <gord.RE...@gmail.com> writes:
>
>> > > C:\> perl -we "my @arr; print int(defined(@arr)), qq{\n}"
>> > > defined(@array) is deprecated at -e line 1.
>> > > (Maybe you should just omit the defined()?)
>> > > 0
>
>> > Maybe it's depreciated, but it still serves to illustrate the
>> > point that the array or hash, before being initialized, are
>> > undefined in any sense of the word. So maybe it's not literally
>> > "undef", it might as well be.
>
>> do you know what DEPRECATED means? it ain't depreciated. caps were
>> used to help the learning handicapped.
>
> Do you really have to insult people over a silly typo? Is it possible
> for you to carry a civil conversation?

Sounds like you're new to USENET. They used to be called "flames"
(maybe still are).


--

Jim Cochrane

unread,
Jun 17, 2008, 1:37:04 AM6/17/08
to
On 2008-06-16, comp.llang.perl.moderated <c...@blv-sam-01.ca.boeing.com> wrote:
> On Jun 16, 9:19 am, "Gordon Corbin Etly" <gord....@gmail.com> wrote:
>> Randal L. Schwartz wrote:
>> >>>>>> "Gordon" == Gordon Corbin Etly <gord....@gmail.com> writes:
>> > Gordon> Actaully, yes they do:
>>
>> > Gordon> # perl -e 'my @arr; print int(@arr == undef), "\n"'
>> > Gordon> 1
>> > Gordon> # perl -e 'my %hash; print int(%hash == undef), "\n"'
>> > Gordon> 1
>>
>> > ...

>>
>> Then why does defined() return false until the array or hash are
>> defined?
>
> Because defined()'s meaning gets twisty
> when dealing with arrays/hashes. Until
> memory's been allocated, defined() will
> be false but then remain true even if it
> gets emptied again:

Sounds like it would have been much better if defined had been originally
specified to throw an exception or generate a runtime error if its
argument was not scalar.

>
> $ perl -le '@a=(1);print defined @a;@a=();
> print defined @a'
> 1
> 1
>
> perldoc -q empty
>
> Why does defined() return true on empty
> arrays and hashes?
>
> The short story is that you should probably
> only use defined on scalars or functions, not
> on aggregates (arrays and hashes). See
> "defined" in perlfunc in the 5.004 release
> or later of Perl for more detail.
>
> perldoc -f defined
>
> Use of "defined" on aggregates (hashes and
> arrays) is deprecated. It used to report
> whether memory for that aggregate has ever
> been allocated. This behavior may disappear
> in future versions of Perl.
>
>
> --
> Charles DeRykus


--

Uri Guttman

unread,
Jun 17, 2008, 1:37:08 AM6/17/08
to
>>>>> "JC" == Jim Cochrane <allergic...@no-spam-allowed.org> writes:

JC> On 2008-06-17, Gordon Corbin Etly <gremove...@gmail.com> wrote:
>> Uri Guttman wrote:
>>>>>>>> "GCE" == Gordon Corbin Etly <gord.RE...@gmail.com> writes:
>>
>>> > > C:\> perl -we "my @arr; print int(defined(@arr)), qq{\n}"
>>> > > defined(@array) is deprecated at -e line 1.
>>> > > (Maybe you should just omit the defined()?)
>>> > > 0
>>
>>> > Maybe it's depreciated, but it still serves to illustrate the
>>> > point that the array or hash, before being initialized, are
>>> > undefined in any sense of the word. So maybe it's not literally
>>> > "undef", it might as well be.
>>
>>> do you know what DEPRECATED means? it ain't depreciated. caps were
>>> used to help the learning handicapped.
>>
>> Do you really have to insult people over a silly typo? Is it possible
>> for you to carry a civil conversation?

JC> Sounds like you're new to USENET. They used to be called "flames"
JC> (maybe still are).

you joined in too late. troll gordon is the one to blame. :)

Uri Guttman

unread,
Jun 17, 2008, 1:38:59 AM6/17/08
to
>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:

GCE> You're not civil period. You stoop to childish name calling and
GCE> you're not adding anything to the thread. You're a pompous old
GCE> fool who get see passed more than 3 meters in front of them and
GCE> seems to believe he is god's gift to the Perl community.

nah, i $DEITY's punishment for you. you are the one feeling the pain. i
am toying with you like a cat with a mortally wounded mouse.

GCE> Grow the bloody hell up, go fly a kite and get laid. Stop waiting
GCE> everyone's time with your pointless insulting drivel that only serves
GCE> your own need to push people down.

try the code posted. or are ya too chicken?? CLUCK CLUCK!!

and learn some perl. or better yet learn python. they like your type.

Uri Guttman

unread,
Jun 17, 2008, 1:48:20 AM6/17/08
to

guess what this code prints. or better yet since you won't guess, run it
and explain it. then defend defined on aggregates. pretty simple looking
code!


use strict ;
use warnings ;

foreach ( 1 .. 3 ) {

my @array ;
print "defined $_\n" if defined @array ;
print "empty $_\n" unless @array ;
@array = (1) ;
}

uri

Uri Guttman

unread,
Jun 17, 2008, 1:48:30 AM6/17/08
to

Uri Guttman

unread,
Jun 17, 2008, 1:48:40 AM6/17/08
to
guess what this code prints. or better yet since you won't guess, run it
and explain it. then defend defined on aggregates. pretty simple looking
code!


use strict ;
use warnings ;

foreach ( 1 .. 3 ) {

my @array ;
print "defined $_\n" if defined @array ;
print "empty $_\n" unless @array ;
@array = (1) ;
}

uri

Uri Guttman

unread,
Jun 17, 2008, 1:51:01 AM6/17/08
to
>>>>> "JC" == Jim Cochrane <allergic...@no-spam-allowed.org> writes:

JC> Sounds like it would have been much better if defined had been
JC> originally specified to throw an exception or generate a runtime
JC> error if its argument was not scalar.

it wasn't done that way for some reason long lost. it has a very minor
side purpose which isn't really needed. so now it is officially
deprecated and it issues a warning. it will likely be changed to a fatal
error in future versions (which is what usually happens to deprecated
features).

Jim Cochrane

unread,
Jun 17, 2008, 2:13:22 AM6/17/08
to
On 2008-06-17, Uri Guttman <u...@stemsystems.com> wrote:
>>>>>> "JC" == Jim Cochrane <allergic...@no-spam-allowed.org> writes:
>
> JC> Sounds like it would have been much better if defined had been
> JC> originally specified to throw an exception or generate a runtime
> JC> error if its argument was not scalar.
>
> it wasn't done that way for some reason long lost. it has a very minor
> side purpose which isn't really needed. so now it is officially
> deprecated and it issues a warning.

Yes, I assumed that was the case - One can't always make the perfect
choice in the beginning.

> it will likely be changed to a fatal
> error in future versions (which is what usually happens to deprecated
> features).

Yes, deprecating for a while makes sense, of course - don't want to piss
too many people off by breaking old code.


--

Eric Pozharski

unread,
Jun 17, 2008, 3:15:04 AM6/17/08
to
Martien Verbruggen <mg...@tradingpost.com.au> wrote:
*SKIP*

> A hash in scalar context evaluates to 0 (formally: false) if it has no
> elements, and to #used_buckets/#allocated_buckets (formally: true)
> otherwise. (1) The 'formally' bits indicate that those values should
> only be used to est truthness.

At last! Someone just told me what C<scalar %hash> is! Thanks, thanks,
thanks... I was curious on that something about year. Thanks, thanks,
thanks.

*CUT*
--
Torvalds' goal for Linux is very simple: World Domination

A. Sinan Unur

unread,
Jun 17, 2008, 8:13:39 AM6/17/08
to
Eric Pozharski <why...@pozharski.name> wrote in
news:os4ki5x...@carpet.zombinet:

> Martien Verbruggen <mg...@tradingpost.com.au> wrote:
> *SKIP*
>> A hash in scalar context evaluates to 0 (formally: false) if it has
>> no elements, and to #used_buckets/#allocated_buckets (formally: true)
>> otherwise. (1) The 'formally' bits indicate that those values should
>> only be used to est truthness.
>
> At last! Someone just told me what C<scalar %hash> is! Thanks,
> thanks, thanks... I was curious on that something about year.
> Thanks, thanks, thanks.

<blockquote>
perldoc perldata


If you evaluate a hash in scalar context, it returns false if the hash
is empty. If there are any key/value pairs, it returns true; more
precisely, the value returned is a string consisting of the number of
used buckets and the number of allocated buckets, separated by a slash.
This is pretty much useful only to find out whether Perl's internal
hashing algorithm is performing poorly on your data set. For example,
you stick 10,000 things in a hash, but evaluating %HASH in scalar
context reveals "1/16", which means only one out of sixteen buckets has
been touched, and presumably contains all 10,000 of your items. This
isn't supposed to happen. If a tied hash is evaluated in scalar context,
a fatal error will result, since this bucket usage information is
currently not available for tied hashes.

You can preallocate space for a hash by assigning to the keys()
function. This rounds up the allocated buckets to the next power of two:

keys(%users) = 1000; # allocate 1024 buckets

</blockquote>

You can always read the documentation for yourself. You don't need
others to do it for you.

Sinan

--
A. Sinan Unur <1u...@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

brian d foy

unread,
Jun 17, 2008, 10:08:59 AM6/17/08
to
In article <6bnig6F...@mid.individual.net>, Gordon Corbin Etly
<gord...@gmail.com> wrote:


> That is a list in an anonymous array. The list is the literal
> representation of the array.
>
> Just like in c or C++
>
> int arr[5] = {1, 2, 3, 4, 5};
>
> This was always considered the literal form of arr[0]=1; arrar[1]=2;

on the right hand side you have the container, and on the left hand
side you have the data. In Perl, you don't always need to have the data
in a container. That's why an array holds a list, but not every list
is an array.

Stephan Bour

unread,
Jun 17, 2008, 10:53:53 AM6/17/08
to
Uri Guttman wrote:
} guess what this code prints. or better yet since you won't guess, run
} it and explain it. then defend defined on aggregates. pretty simple
} looking code!
}
}
} use strict ;
} use warnings ;
}
} foreach ( 1 .. 3 ) {
}
} my @array ;
} print "defined $_\n" if defined @array ;
} print "empty $_\n" unless @array ;
} @array = (1) ;
} }

---
defined(@array) is deprecated at - line 7.


(Maybe you should just omit the defined()?)

empty LANG
defined LANG
empty LANG
defined LANG
empty LANG
---

Since 'my @array' is insid the loop, then it should be starting at an
undefiend state each time. It seems it would be better to fix defined's
broken bahavior rather than just deprecating it. I agree with what other
people have said; it should return False when it is unefined (declared but
not assigned anything, or undef() called upon it.)

Stephan.

Stephan Bour

unread,
Jun 17, 2008, 10:57:28 AM6/17/08
to

Agreed. Every thread I see Uri jump into recently seems to turn into a flame
pit. I wish he would grow up and learn to make civilized responses so this
group can carry decent discussions instead of escalating into childish
scuffles.


Stephan.


Stephan Bour

unread,
Jun 17, 2008, 11:01:02 AM6/17/08
to
Uri Guttman wrote:
} "JC" == Jim Cochrane <allergic...@no-spam-allowed.org>
} writes:
} > Sounds like you're new to USENET. They used to be called "flames"
} > (maybe still are).
}
} you joined in too late. troll gordon is the one to blame. :)

The only one acting like a troll in this thread is you. I see nothing but
insults coming from your direction. Why aren't you setting an example, as a
veteran of this news group, of how to engage in a proper, civilized, and
mature discussion? It seems to me you are doing the exact opposite, and then
branding the "other guy" as a troll? Very mature indeed.


Stephan.


Stephan Bour

unread,
Jun 17, 2008, 11:06:22 AM6/17/08
to
Uri Guttman wrote:
> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:
}
} > You're not civil period. You stoop to childish name calling and
} > you're not adding anything to the thread. You're a pompous old
} > fool who get see passed more than 3 meters in front of them and
} > seems to believe he is god's gift to the Perl community.
}
} nah, i $DEITY's punishment for you. you are the one feeling the pain.
} i am toying with you like a cat with a mortally wounded mouse.

First off, your first sentence makes no sense.., for instance, "I God's
punishment for you"? Second, how can you dare call anyone else a troll after
(delusional) behavior like this?


Stephan.

Uri Guttman

unread,
Jun 17, 2008, 11:14:01 AM6/17/08
to
>>>>> "SB" == Stephan Bour <sb...@niaid.nih.gov> writes:


SB> Agreed. Every thread I see Uri jump into recently seems to turn
SB> into a flame pit. I wish he would grow up and learn to make
SB> civilized responses so this group can carry decent discussions
SB> instead of escalating into childish scuffles.

you don't read many threads then. i don't start flame wars. this thread
was a post about a flash card perl thing. i reviewed it like i review
all things like it, hard and accurately. that is part of my work and i
take it seriously. gordon troll then jumps in to defend things and
attacks my comment style as usual. he is also wrong on several
counts. then he defends defined on aggregates where he is very wrong and
pigheaded to the point of ignoring what the docs say about it being
deprecated. he think and flames it is useful. that is not what i call
civil as it is just stupid. but that is gordo who changes his name all
the time and doesn't listen to those who know perl a wee bit better.

Uri Guttman

unread,
Jun 17, 2008, 11:14:33 AM6/17/08
to
>>>>> "SB" == Stephan Bour <sb...@niaid.nih.gov> writes:

SB> Uri Guttman wrote:
SB> } "JC" == Jim Cochrane <allergic...@no-spam-allowed.org>
SB> } writes:
SB> } > Sounds like you're new to USENET. They used to be called "flames"
SB> } > (maybe still are).
SB> }
SB> } you joined in too late. troll gordon is the one to blame. :)

SB> The only one acting like a troll in this thread is you. I see
SB> nothing but insults coming from your direction. Why aren't you
SB> setting an example, as a veteran of this news group, of how to
SB> engage in a proper, civilized, and mature discussion? It seems to
SB> me you are doing the exact opposite, and then branding the "other
SB> guy" as a troll? Very mature indeed.

boo hoo hoo!

you don't get sarcasm either, do you?

Uri Guttman

unread,
Jun 17, 2008, 11:15:08 AM6/17/08
to
>>>>> "SB" == Stephan Bour <sb...@niaid.nih.gov> writes:

SB> Uri Guttman wrote:
>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:

SB> }
SB> } > You're not civil period. You stoop to childish name calling and
SB> } > you're not adding anything to the thread. You're a pompous old
SB> } > fool who get see passed more than 3 meters in front of them and
SB> } > seems to believe he is god's gift to the Perl community.
SB> }
SB> } nah, i $DEITY's punishment for you. you are the one feeling the pain.
SB> } i am toying with you like a cat with a mortally wounded mouse.

SB> First off, your first sentence makes no sense.., for instance, "I
SB> God's punishment for you"? Second, how can you dare call anyone
SB> else a troll after (delusional) behavior like this?

easy. for i am THE PERL HUNTER. :)

szr

unread,
Jun 17, 2008, 1:00:53 PM6/17/08
to

That appears to be the point he was making. That the "value" an array
holds is a list. Maybe some people have conflicting definitions of what
"literal" means in the context of "literal form", which a list can be
viewed as when talking about arrays.

--
szr


Gordon Corbin Etly

unread,
Jun 17, 2008, 1:09:40 PM6/17/08
to
Uri Guttman wrote:
>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:

> > > years of perl and you didn't know about arrays and undef? or
> > > defined?

> > Why are you assuming I didn't know about that? I was attempting to
> > make civil discussion about a point stemming from Ben Bullock's
> > comments which I still believe has some validity.

> nope. you made wrong statements about arrays and defined. then you
> tried to back them up when the docs said you were wrong.

No, this is bunk. what I said was the behavior seemed to make sense to
me. I never disputed the docs.


> tell me what this will print before you run it. and after you run it
> please come back and beg forgiveness for your thickheadedness on why
> defined makes no sense on arrays.
>
> use strict ;
> use warnings ;
>
> foreach ( 1 .. 3 ) {
>
> my @array ;
> print "defined $_\n" if defined @array ;
> print "empty $_\n" unless @array ;
> @array = (1) ;
> }

Yes you've already posted this. It actually shows what appears to be
broken behavior, given how a new @array is created each time through the
loop. And you still haven't answered my question of why it would be bad
to fix define in a way that it works with scalars - it doesn't seem
unreasonable, especially when that's almost how it works currently,
deprecated or not.


--
G. C. Etly


Stephan Bour

unread,
Jun 17, 2008, 4:24:57 PM6/17/08
to
Uri Guttman wrote:
} >>>>> "SB" == Stephan Bour <sb...@niaid.nih.gov> writes:
}
}
} > Agreed. Every thread I see Uri jump into recently seems to turn
} > into a flame pit. I wish he would grow up and learn to make
} > civilized responses so this group can carry decent discussions
} > instead of escalating into childish scuffles.
}
} i don't start flame wars.

Yes you do.

} this thread was a post about a flash card perl thing. i reviewed it
} like i review all things like it, hard and accurately. that is part of my
} work and i take it seriously. gordon troll then jumps in to defend
} things and attacks my comment style as usual. he is also wrong on
} several counts. then he defends defined on aggregates where he is very
wrong
} and pigheaded to the point of ignoring what the docs say about it
} being deprecated. he think and flames it is useful. that is not what
} i call civil as it is just stupid. but that is gordo who changes his
} name all the time and doesn't listen to those who know perl a wee bit
} better.

I never saw Gordon do anything wrong; all I saw him do was make a point
about something and then you once again jumped onto his back for no reason.
Then when you recount event, you twist around reality so much I think you're
actually starting to believe your own lies.

Stop bullying people and get a hobby. Stop inciting flame wars and leave
your grievances at the door and grow up.


Stephan.


Keith Keller

unread,
Jun 17, 2008, 4:52:32 PM6/17/08
to
On 2008-06-17, Stephan Bour <sb...@niaid.nih.gov> wrote:
>
> I never saw Gordon do anything wrong;

''Gordon'' has been doing many things wrong for some time now; while Uri
and the rest of us would probably be better off ignoring him (would you
argue with the-japanese-lizard-which-shall-not-be-named about these
topics?), Gordon clearly can not claim the moral high ground here.
(Have you read his justification of his morphing? If that's not a clear
troll indicator I don't know what is.)

--keith

--
kkeller...@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

Jürgen Exner

unread,
Jun 17, 2008, 6:51:11 PM6/17/08
to
Keith Keller <kkeller...@wombat.san-francisco.ca.us> wrote:
>On 2008-06-17, Stephan Bour <sb...@niaid.nih.gov> wrote:
>>
>> I never saw Gordon do anything wrong;
>
>''Gordon'' has been doing many things wrong for some time now; while Uri
>and the rest of us would probably be better off ignoring him (would you
>argue with the-japanese-lizard-which-shall-not-be-named about these
>topics?), Gordon clearly can not claim the moral high ground here.
>(Have you read his justification of his morphing? If that's not a clear
>troll indicator I don't know what is.)

Also it is worthwhile to point out that recently a few new names popped
up, which have never been heard of before in this group (that is
interesting but _not_ suspicious) except to argue in favour of Mr. Etly
(that _is_ suspicious).

jue

Stephan Bour

unread,
Jun 17, 2008, 9:14:02 PM6/17/08
to
Jürgen Exner wrote:
} Keith Keller <kkeller...@wombat.san-francisco.ca.us> wrote:
} > On 2008-06-17, Stephan Bour <sb...@niaid.nih.gov> wrote:
} > >
} > > I never saw Gordon do anything wrong;
} >
} > ''Gordon'' has been doing many things wrong for some time now;

Then please, give an example.

} > while Uri and the rest of us would probably be better off ignoring him

Who are "the test of us" ?

} > (would you argue with the-japanese-lizard-which-shall-not-be-named
} > about these topics?),

Which topics?

} > Gordon clearly can not claim the moral high ground here.

As far as I can tell, neigher can someone who keeps insulting people.

} > (Have you read his justification of his morphing? If
} > that's not a clear troll indicator I don't know what is.)

Maybe you should define what you mean by "morphing"? This would appear to be
one of those terms with varying definitions.

In his case, he changed his email, not his name. I've always known
"morphing" to mean someone who changes either their name or both their name
& email address, but not changing their email address alone.

That aside, what appears to be happening here is people like Uri ganging up
on this guy because they are not seeing eye to eye. This to me is just
wrong. Uri is not new to this news group not Usenet, so I would expect a bit
more maturity from him.

} Also it is worthwhile to point out that recently a few new names
} popped up, which have never been heard of before in this group (that
} is interesting but _not_ suspicious) except to argue in favour of Mr.
} Etly (that _is_ suspicious).

On Usenet many people like yourself and Uri use words like "troll" much to
easily. I don't think it was ever meant to be a crutch to be used by people
of influence to win arguments and discredit those they do not agree with.
Like with any term that's over used, it becomes ever the more meaningless.


Stephan.


Eric Pozharski

unread,
Jun 17, 2008, 2:38:00 PM6/17/08
to
A. Sinan Unur <1u...@llenroc.ude.invalid> wrote:
> Eric Pozharski <why...@pozharski.name> wrote in
> news:os4ki5x...@carpet.zombinet:

*SKIP*
>> Thanks, thanks, thanks.

> <blockquote>
> perldoc perldata

Pity on me. I've overlooked that completely. Gone for reading.

Keith Keller

unread,
Jun 17, 2008, 11:43:22 PM6/17/08
to
On 2008-06-18, Stephan Bour <sb...@niaid.nih.gov> wrote:
> Jürgen Exner wrote:
> } Keith Keller <kkeller...@wombat.san-francisco.ca.us> wrote:
> } >
> } > ''Gordon'' has been doing many things wrong for some time now;
>
> Then please, give an example.

The many morphings; the nitpicking over the documentation without
writing a patch; the not actually reading the documentation while
arguing about what Perl functions actually do. Is that enough?

> } > while Uri and the rest of us would probably be better off ignoring him
>
> Who are "the test of us" ?

"The rest of us" is everyone who posts to clpmisc.

> } > (would you argue with the-japanese-lizard-which-shall-not-be-named
> } > about these topics?),
>
> Which topics?

See above.

> Maybe you should define what you mean by "morphing"? This would appear to be
> one of those terms with varying definitions.

Surprisingly enough, I couldn't find a definition in the jargon file.
The definitions I use are "changing one's headers in an attempt to evade
killfiles" or "changing one's headers excessively". The From: header
is the header I see most commonly morphed.

> In his case, he changed his email, not his name. I've always known
> "morphing" to mean someone who changes either their name or both their name
> & email address, but not changing their email address alone.

I hope you're not seriously buying this argument (if so, I'd have to
consider seriously whether you are actually ''Gordon'' hiding behind yet
another alias). There is no Name: header. There is no Email: header.
There is just the From: header (and the Reply-To: header, which is used
much less frequently). Since most clients killfile first on the From:
header, changing it, whether the name or the email address, circumvents
any killfile entries people have made with the original From: header.

I can already hear your response: but you can use a regexp in killfiles!
Sure, but I find that I seldom need a regexp except for real trolls.

(And, by the way, ''Gordon'' has already used at least three different
versions of his name; I have a hard time coming up with a reasonable
explanation for this morphing.)

> That aside, what appears to be happening here is people like Uri ganging up
> on this guy because they are not seeing eye to eye. This to me is just
> wrong.

I agree. In general, replies should be mostly civil; since it's not
generally possible to be civil with a troll, they should be ignored
except to correct blatant errors in their posts (which ''Gordon'' seems
to make less frequently, though still at a nonzero rate, than other
trolls).

> On Usenet many people like yourself and Uri use words like "troll" much to
> easily. I don't think it was ever meant to be a crutch to be used by people
> of influence to win arguments and discredit those they do not agree with.
> Like with any term that's over used, it becomes ever the more meaningless.

Have you come to this conclusion based on an extensive research of mine
(and Uri's) posting history? Because by my count I have about five in
my killfile. I wouldn't call that excessive, would you? (Contrast this
with the other section I have of people I just plain dislike; I would
not call these people trolls, just jerks. This section is shockingly
large.) (Interestingly enough, it's about five different personalities,
but they take about 20 lines in my killfile, because of morphing. Even
more interestingly, the variable that changes the most is the email
address.)

(And I'm flattered that you seem to think I am a person of influence,
but I can tell you, at least in the Perl community, I'm not.)

Stephan Bour

unread,
Jun 18, 2008, 1:03:39 AM6/18/08
to
Keith Keller wrote:
} On 2008-06-18, Stephan Bour <sb...@niaid.nih.gov> wrote:
} > Jürgen Exner wrote:
} > } Keith Keller <kkeller...@wombat.san-francisco.ca.us> wrote:
} > } >
} > } > ''Gordon'' has been doing many things wrong for some time now;
} >
} > Then please, give an example.
}
} The many morphings; the nitpicking over the documentation without
} writing a patch; the not actually reading the documentation while
} arguing about what Perl functions actually do. Is that enough?

Those are not examples. Please give actual message-ids or some other citing.

} > } > while Uri and the rest of us would probably be better off
} > ignoring him
} >
} > Who are "the test of us" ?

> "The rest of us" is everyone who posts to clpmisc.

Are you saying "everyone who posts to clpmisc" has given you permission to
speak for them? If so, please cite.

} > } > (would you argue with
} > the-japanese-lizard-which-shall-not-be-named } > about these
} > topics?),
} >
} > Which topics?
}
} See above.

Above where? You haven't cited anything. You just gave us your opinion,
which may or may not be accurate.

} > Maybe you should define what you mean by "morphing"? This would
} > appear to be one of those terms with varying definitions.
}
} Surprisingly enough, I couldn't find a definition in the jargon file.
} The definitions I use are "changing one's headers in an attempt to
} evade killfiles" or "changing one's headers excessively". The From:
} header is the header I see most commonly morphed.

Well that's a rather broad definition. The way I see it, if someone changes
their name to appear to be someone else, then that is malicious act. If
someone changes their email address, that's their business. The problem here
seems to be too many people attempting to impose their own legislations in a
realm (Usenet) where such rules to not exist.

No one is actually bound to conforming to anyone's killfile or filter. You
can cry about it all you want. I don't mind killfiles personally, but I do
mind it when people lay down the last word and end it with "plonk" or so and
act as if they have won the argument. I would not do it myself, but I'm not
surprised some people change their email addresses to avoid it. If you
really don't want to read what someone has to say, then simply don't :~)

} > In his case, he changed his email, not his name. I've always known
} > "morphing" to mean someone who changes either their name or both
} > their name & email address, but not changing their email address
} > alone.
}
} I hope you're not seriously buying this argument

Rather than being so forward, could you explain what exactly you find wrong
with it? I have no problem with someone changing their email address - it's
their information. If they use the same name, you still know who they are,
so what really is the problem (other than the fact they have gone around
your filters) ?

} (if so, I'd have to consider seriously whether you are actually
} ''Gordon'' hiding behind yet another alias).

What other aliases has he used? I keep seeing allegation after allegation
being made but not one single citing. What guarantee do I or anyone have
that what you say or your information is accurate, and that you're not just
siding with people like Uri just because they are a regular? Mind you, this
wouldn't be the first time the latter has caused problems in this group.

} There is no Name: header. There is no Email: header.

Who said there was?

} There is just the From: header (and the Reply-To: header,
} which is used much less frequently).

Yes, but what is your point? Most ( at least graphical) clients will show
just the name in the topic list and it's a person's name that tells you who
they are, not the email address. I consider the email address to be the
means to contact someone outside of Usenet.

} Since most clients killfile first on the From: header, changing it,
} whether the name or the email address, circumvents any killfile
} entries people have made with the original From: header.

Most decent clients I've seen allow you to filter on any part, though
filtering on From: and Reply-To: are inherently unreliable, in that you can
not fully filter out anyone who makes the slightest change, must like the
problems associated with filtering mass email spammers. Advanced filter will
go further, such as filtering other headers.

} I can already hear your response: but you can use a regexp in
} killfiles! Sure, but I find that I seldom need a regexp except for
} real trolls.

Actually regex did pop into mind, maybe it's because I'm practically joined
at the hip with them when using Perl :->

} (And, by the way, ''Gordon'' has already used at least three different
} versions of his name; I have a hard time coming up with a reasonable
} explanation for this morphing.)

All I've seen is a middle name. I've seen people occasionally do that, as
it's no crime, though it's unusual if it happens frequently.

} > That aside, what appears to be happening here is people like Uri
} > ganging up on this guy because they are not seeing eye to eye. This
} > to me is just wrong.
}
} I agree. In general, replies should be mostly civil; since it's not
} generally possible to be civil with a troll, they should be ignored
} except to correct blatant errors in their posts (which ''Gordon''
} seems to make less frequently, though still at a nonzero rate, than
} other trolls).

There you go again, tossing around the "troll" label much to easily. I
haven't really seen him acting like a troll. What I have seen is him being
forced onto the defensive by people like Uri, which to me is not the same as
a real troll who waltzes in just to get attention.

} > On Usenet many people like yourself and Uri use words like "troll"
} > much to easily. I don't think it was ever meant to be a crutch to be
} > used by people of influence to win arguments and discredit those
} > they do not agree with. Like with any term that's over used, it
} > becomes ever the more meaningless.
}
} Have you come to this conclusion based on an extensive research of
} mine (and Uri's) posting history? Because by my count I have about
} five in my killfile. I wouldn't call that excessive, would you?

By the count of your killfile, no, but that isn't what I was referring to. I
was talking about the usage of the word. Some of you use it much to
casually, so it's hard to give it much worth just by it simply being
uttered.

} (And I'm flattered that you seem to think I am a person of influence,
} but I can tell you, at least in the Perl community, I'm not.)

Well you are better known here than I. What I meant is anyone who has been
around and knows better should not be such mechanisms to achieve the upper
hand in an argument. That isn't what Usenet was originally about.

Stephan.


Keith Keller

unread,
Jun 18, 2008, 1:14:01 AM6/18/08
to
On 2008-06-18, Stephan Bour <sb...@niaid.nih.gov> wrote:
> If you
> really don't want to read what someone has to say, then simply don't :~)

Good idea.

Jürgen Exner

unread,
Jun 18, 2008, 1:42:23 AM6/18/08
to
"Stephan Bour" <sb...@niaid.nih.gov> wrote:
>[about filtering]

>surprised some people change their email addresses to avoid it.

I dare to claim the right to select whom I want to listen to. While
everyone has the right to express himself, there is no right that he has
to be heard.

I don't care what a certain nutcase posts. I don't want to read it. I
don't want anything to do with it. I am happy to do anything reasonable
on my part to avoid his posts.
However if someone deliberately changes his FROM header with the
expressed purpose(!) of avoiding not being heard, then that is simply
stalking and in many jurisdictions a criminal act.

>If you
>really don't want to read what someone has to say, then simply don't :~)

Don't worry, I won't be reading you any more.

jue

Marc Bissonnette

unread,
Jun 18, 2008, 2:48:00 AM6/18/08
to
Jürgen Exner <jurg...@hotmail.com> fell face-first on the keyboard. This
was the result: news:4t6h54pbtbp14hsm3...@4ax.com:

> "Stephan Bour" <sb...@niaid.nih.gov> wrote:
>>[about filtering]
>>surprised some people change their email addresses to avoid it.
>
> I dare to claim the right to select whom I want to listen to. While
> everyone has the right to express himself, there is no right that he has
> to be heard.
>
> I don't care what a certain nutcase posts. I don't want to read it. I
> don't want anything to do with it. I am happy to do anything reasonable
> on my part to avoid his posts.
> However if someone deliberately changes his FROM header with the
> expressed purpose(!) of avoiding not being heard, then that is simply
> stalking and in many jurisdictions a criminal act.

I have to agree strongly with this point: While one may have the "right" to
change one's From: header ("right" as in, it's your app, your information,
your computer), it is simply childish attention getting [1] to change your
From: header for the sole purpose of getting around filters. If someone has
decided they don't want to read - and therefore respond - to your content,
who are you [2] to force them to see your content ?

The "simply don't read it" argument doesn't wash: Killfiles and regexes
being used in said killfiles are there to give the choice *not* to read
even the subject line in the group display.

I hadn't quite thought of it this way, but Jürgen raises an excellent
point: It is akin to stalking. Imagine, if you will, a parent telling their
kid to stay away from the dark alley to avoid the bullies - Using your
killfile is akin to exactly that - Avoiding the unpleasantness.
Constantly/frequently (as in - more than once per year) changing your From:
header is the bullies leaving the alley to follow you around the
neighbourhood.


[1] I'll admit to doing this myself about three times in fifteen years -
Twice when the heat of an online argument got the better of me and once to
respond to a nutjob who supposedly had me killfiled, but used Google Groups
to reply to my posts when others were agreeing with them - In all three
cases, still childish and plain dumb. Other than that, my dragnet@ address
has remained the same for ten years or so, with only one change to add \_
and _/ around the @ to mildly mess up harvesters.

[2] "You" in the generic sense, not specifically aimed at any one person in
this thread.

--
Marc Bissonnette
Looking for a new ISP? http://www.canadianisp.com
Largest ISP comparison site across Canada.

Uri Guttman

unread,
Jun 18, 2008, 4:02:26 AM6/18/08
to
>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:

>> use strict ;
>> use warnings ;
>>
>> foreach ( 1 .. 3 ) {
>>
>> my @array ;
>> print "defined $_\n" if defined @array ;
>> print "empty $_\n" unless @array ;
>> @array = (1) ;
>> }

GCE> Yes you've already posted this. It actually shows what appears to
GCE> be broken behavior, given how a new @array is created each time
GCE> through the loop. And you still haven't answered my question of
GCE> why it would be bad to fix define in a way that it works with
GCE> scalars - it doesn't seem unreasonable, especially when that's
GCE> almost how it works currently, deprecated or not.

see you don't get it. it isn't broken behavior but behavior that
shouldn't have been there to begin with. like my $x = 1 if 0 stuff which
does something that was bad but not deprecated until recently.

and it doesn't almost work that way. and you don't get how allocation
works or the difference between a scalar value and an aggregate of
them. just let this go as you don't want to learn those things and you
are hanging on your little island hoping to be rescured. p5p ain't
coming to rescue you. defined on aggregates was never meant to be used
and now it will go away like it should.

Stephan Bour

unread,
Jun 18, 2008, 9:44:01 AM6/18/08
to
Jürgen Exner wrote:
} "Stephan Bour" <sb...@niaid.nih.gov> wrote:
} > [about filtering]
} > surprised some people change their email addresses to avoid it.
}
} I dare to claim the right to select whom I want to listen to. While
} everyone has the right to express himself, there is no right that he
} has to be heard.

I agree.

} I don't care what a certain nutcase posts. I don't want to read it. I
} don't want anything to do with it. I am happy to do anything
} reasonable on my part to avoid his posts.

I also agree with that.

} However if someone deliberately changes his FROM header with the
} expressed purpose(!) of avoiding not being heard, then that is simply
} stalking and in many jurisdictions a criminal act.

I have to disagree here. I don't see how you can equate changing a FROM
header to following someone to their home and watching them through their
window, which is what stalking typically involves. On Usenet, no such
legislation exists, so please don't try to create them as you go.

} > If youreally don't want to read what someone has to say, then simply

don't
} > :~)
}
} Don't worry, I won't be reading you any more.

And that's you choice. On the other hand, if people like you were mature
enough to avoid name calling and were actually willing to cite examples to
backup your accusations that you keep making (and possibly your behaviors,)
you probably wouldn't get type of responses like you did from me in the
first place. Not everyone likes to sit idle while a group of people beats a
man senseless in the street.

You cannot tell me I didn't give you and others ample opportunity to provide
some citations, and none of you did, so I left with the conclusion that this
is another classic example of group-think and people getting branded far
lower than they deserved. I've been on Usenet long enough to know this is
nothing new. I don't expect you or Keith or Uri to admit any faults of your
own in cases like these, that any of you had acted inappropriately, seeing
as you can't even prove your cases by the simplest of methods.


Stephan.


Stephan Bour

unread,
Jun 18, 2008, 9:55:33 AM6/18/08
to
Marc Bissonnette wrote:
} Jürgen Exner <jurg...@hotmail.com> fell face-first on the keyboard.
} This was the result: news:4t6h54pbtbp14hsm3...@4ax.com:
}
} > "Stephan Bour" <sb...@niaid.nih.gov> wrote:
} > > [about filtering]
} > > surprised some people change their email addresses to avoid it.
}
} > However if someone deliberately changes his FROM header with the
} > expressed purpose(!) of avoiding not being heard, then that is simply
} > stalking and in many jurisdictions a criminal act.
}
} I have to agree strongly with this point: While one may have the
} "right" to change one's From: header ("right" as in, it's your app,
} your information, your computer), it is simply childish attention
} getting [1] to change your From: header for the sole purpose of
} getting around filters.

It may be childish, agreed, but another side may be that no one is bound to
adhering to your filters. Some of you seem to over look this little tidbit
all too easily.

} If someone has decided they don't want to
} read - and therefore respond - to your content, who are you [2] to
} force them to see your content ?

That's where you are really wrong; no one is forced to do _anything_, as you
do not have to read _any_ post. Everything you do is by your own choice. If
I were to tie you to your chair and tape your eye lids open and shove a
laptop with the content opened into your face, that would be another story,
but it's most decidedly not the cases here.

} [1] I'll admit to doing this myself about three times in fifteen
} years - Twice when the heat of an online argument got the better of
} me and once to respond to a nutjob who supposedly had me killfiled,
} but used Google Groups to reply to my posts when others were agreeing
} with them -

So it seems here, you are almost vindicating the people who do change their
FROM header. You don't do it often, but you did do it to get around
someone's killfile.

} In all three cases, still childish and plain dumb. Other
} than that, my dragnet@ address has remained the same for ten years or
} so, with only one change to add \_ and _/ around the @ to mildly mess
} up harvesters.

And in doing such changes you bypass any filters that have you. And again
you've proved that anyone has the right to change such information, childish
or not.


Stephan.


Gordon Corbin Etly

unread,
Jun 18, 2008, 10:41:03 AM6/18/08
to
Uri Guttman wrote:
>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:

> > > use strict ;
> > > use warnings ;
> > >
> > > foreach ( 1 .. 3 ) {
> > >
> > > my @array ;
> > > print "defined $_\n" if defined @array ;
> > > print "empty $_\n" unless @array ;
> > > @array = (1) ;
> > > }

> > Yes you've already posted this. It actually shows what appears to


> > be broken behavior, given how a new @array is created each time

> > through the loop. And you still haven't answered my question of

> > why it would be bad to fix define in a way that it works with

> > scalars - it doesn't seem unreasonable, especially when that's

> > almost how it works currently, deprecated or not.

> see you don't get it. it isn't broken behavior but behavior that
> shouldn't have been there to begin with. like my $x = 1 if 0 stuff
> which does something that was bad but not deprecated until recently.

I do get it. Maybe tell nose thumbing would allow us to understand each
other better.


> and it doesn't almost work that way. and you don't get how allocation
> works or the difference between a scalar value and an aggregate of
> them. just let this go as you don't want to learn those things and you
> are hanging on your little island hoping to be rescured. p5p ain't
> coming to rescue you. defined on aggregates was never meant to be used
> and now it will go away like it should.

Stop assuming I don't get things or that I don't want to learn, as that
couldn't be further from the truth.


--
G. C. Etly


Marc Bissonnette

unread,
Jun 18, 2008, 11:04:48 AM6/18/08
to
"Stephan Bour" <sb...@niaid.nih.gov> fell face-first on the keyboard.
This was the result: news:qt86k.5824$N87....@nlpi068.nbdc.sbc.com:

I disagree: Personally, I use XNews as my newsreader. I have three people
in my killfile that are, IMO, prolific nonsense posters. When they are
killfiled, my articles list is short and concise - I can see the ebb and
flow of any discussion and choose to read it or not - I don't see the
ko0k's content *OR* headers, because they are filtered out.

When they morph, I am indeed forced to see their article headers, meaning
the three newsgroups they appear in are indeed far more cluttered and
makes a quick glance at a conversation's ebb and flow more difficult.

Perhaps *you* don't look at Usenet this way, or skimming articles, but I
and a great many others do. I know for a fact that a great many people
agree with this definition of being "forced" to see the content.

> } [1] I'll admit to doing this myself about three times in fifteen
> } years - Twice when the heat of an online argument got the better of
> } me and once to respond to a nutjob who supposedly had me killfiled,
> } but used Google Groups to reply to my posts when others were
> agreeing } with them -
>
> So it seems here, you are almost vindicating the people who do change
> their FROM header. You don't do it often, but you did do it to get
> around someone's killfile.
>
> } In all three cases, still childish and plain dumb. Other
> } than that, my dragnet@ address has remained the same for ten years
> or } so, with only one change to add \_ and _/ around the @ to mildly
> mess } up harvesters.
>
> And in doing such changes you bypass any filters that have you. And
> again you've proved that anyone has the right to change such
> information, childish or not.

Sigh. With all due respect, I believe you are being a pedant
intentionally. Surely, you don't need actual examples of things where one
has the "right" to do something, but common sense or courtesy curtails
it, yes ? Scratch that - I get the feeling you want to take the pedantic
route, so let's see if I can think of an appropriate example.

Ah! Here's one: My neighbour right now is having his septic tank and
weeping bed replaced. Given the access to his backyard is quite narrow
due to two buildings, two massive trees and three sheds, I've told their
crew they can use my lane and remove the fence between our two yards to
move their machinery in to do the digging, as well as the crane in my
laneway to lower the new septic tank.

I have the *RIGHT* to say "Stay off my property". It's *my* property - I
don't *have* to let heavy equipment over my lawn, remove a fence and
damage the soil. There wouldn't be a bloody thing my neighbour could do
about it, either - Without access via my property, they'd have to bring
in a skidsteer and a small Kubota excavator, rather than the one Case
backhoe, which would extend the job by a week and increase the labour and
cost by a factor of five.

But by your logic, it would be perfectly fine to excersise my *right* to
deny access to my property - Legally, I'm totally covered. Morally,
however, it's a crappy thing to do.

Somehow, I think that if you were a Canadian, you'd be a die-hard NDP
voter.

Uri Guttman

unread,
Jun 18, 2008, 12:02:22 PM6/18/08
to
>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:

GCE> Uri Guttman wrote:
>>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:

>> see you don't get it. it isn't broken behavior but behavior that
>> shouldn't have been there to begin with. like my $x = 1 if 0 stuff
>> which does something that was bad but not deprecated until recently.

GCE> I do get it. Maybe tell nose thumbing would allow us to understand each
GCE> other better.

huh?? and you don't get it. otherwise you wouldn't have been defending
the undefensible for so long. and i don't get that you even acknowledge
you were wrong about it. you recently still asked why it isn't useful
for defined to work on aggregates. that doesn't sound like getting it.

>> and it doesn't almost work that way. and you don't get how allocation
>> works or the difference between a scalar value and an aggregate of
>> them. just let this go as you don't want to learn those things and you
>> are hanging on your little island hoping to be rescured. p5p ain't
>> coming to rescue you. defined on aggregates was never meant to be used
>> and now it will go away like it should.

GCE> Stop assuming I don't get things or that I don't want to learn, as that
GCE> couldn't be further from the truth.

nah, it is very close to the truth. true learners would have shut up
long ago and listened to me or accepted the docs. this is not a complex
issue and you have trolled on it for a long time. defined is meant to
test a scalar value for undef. that is ever worked on aggregates was a
mistake that is being corrected. pretty simple stuff. just post that you
accept that and that you were wrong. this is the path of learning. if
you truly claim you are learning you would do this. but you won't. i
would bet many quatloos on this.

Stephan Bour

unread,
Jun 18, 2008, 3:55:31 PM6/18/08
to

That's fine. I agree.

> When they morph, I am indeed forced to see their article headers,
> meaning the three newsgroups they appear in are indeed far more
> cluttered and makes a quick glance at a conversation's ebb and flow
> more difficult.

I agree that is unfortunate, but filtering just a client side user tool,
nothing more, nothing less. There is no guarentee it will always work, and
thus too much faith should not be invested in it. It's a tool. Do you get
upset when your egrep pattern misses something?

> Perhaps *you* don't look at Usenet this way, or skimming articles,
> but I and a great many others do. I know for a fact that a great many
> people agree with this definition of being "forced" to see the
> content.

To me, forced means I have no other alternative but to read the content of
the post. Either you see their name in the topic list, or, when looking at
someone else's reply, usually you have the "foo wrote:" line before the
content. Point being, you always have the choice whether or not to read it.
It's called will power. ;->

} > } [1] I'll admit to doing this myself about three times in fifteen
} > } years - Twice when the heat of an online argument got the better of
} > } me and once to respond to a nutjob who supposedly had me killfiled,
} > } but used Google Groups to reply to my posts when others were
} > } agreeing with them -
} >
} > So it seems here, you are almost vindicating the people who do change
} > their FROM header. You don't do it often, but you did do it to get
} > around someone's killfile.
} >
} > } In all three cases, still childish and plain dumb. Other
} > } than that, my dragnet@ address has remained the same for ten years
} > }or so, with only one change to add \_ and _/ around the @ to mildly
} > } mess up harvesters.
} >
} > And in doing such changes you bypass any filters that have you. And
} > again you've proved that anyone has the right to change such
} > information, childish or not.
}
} Sigh. With all due respect, I believe you are being a pedant
} intentionally. Surely, you don't need actual examples of things where
} one has the "right" to do something, but common sense or courtesy
} curtails it, yes ? Scratch that - I get the feeling you want to take
} the pedantic route, so let's see if I can think of an appropriate
} example.

I don't believe that's what I said; where did I ask for an example?

} Ah! Here's one: My neighbour right now is having his septic tank and
} weeping bed replaced. Given the access to his backyard is quite narrow
} due to two buildings, two massive trees and three sheds, I've told
} their crew they can use my lane and remove the fence between our two
} yards to move their machinery in to do the digging, as well as the
} crane in my laneway to lower the new septic tank.
}
} I have the *RIGHT* to say "Stay off my property". It's *my* property
} - I don't *have* to let heavy equipment over my lawn, remove a fence
} and damage the soil. There wouldn't be a bloody thing my neighbour
} could do about it, either - Without access via my property, they'd
} have to bring in a skidsteer and a small Kubota excavator, rather
} than the one Case backhoe, which would extend the job by a week and
} increase the labour and cost by a factor of five.

This analogy might work if someone were to actually break into your
computer. I don't see how changing one's FROM header can equate to
trespassing; it's more akin to parking your car in way so you don't have to
see the over flowing trash cans of the neighour across the street who have
nine children, and then that neighour comes out and moves the cans over to
the left and once again in sight. Nothing illegal, though possibly rude, but
not necessarily intended as such. It's their can and if they want to move it
they are free to do so.

} But by your logic, it would be perfectly fine to excersise my *right*
} to deny access to my property - Legally, I'm totally covered. Morally,
} however, it's a crappy thing to do.

But a news group is not your personal property. It's akin to public
property. Would you go onto a street corner and tell someone they cannot
place a garbage can because you or your group don't like it there? No. You
would more likely talk to the owner of the can and ask them to move it, but
they are not obligated to agree.

} Somehow, I think that if you were a Canadian, you'd be a die-hard NDP
} voter.

Actually I vote for what I believe is right. I don't vote by any single
party. I take pride in being a free thinking individual, as I'm sure you are
too. :->


Stephan.


Gordon Corbin Etly

unread,
Jun 18, 2008, 4:16:30 PM6/18/08
to
Uri Guttman wrote:
>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:
> > Uri Guttman wrote:
> >>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:

> > > see you don't get it. it isn't broken behavior but behavior that
> > > shouldn't have been there to begin with. like my $x = 1 if 0 stuff
> > > which does something that was bad but not deprecated until
> > > recently.

> > I do get it. Maybe tell nose thumbing would allow us to understand
> > each other better.

> huh?? and you don't get it. otherwise you wouldn't have been defending
> the undefensible for so long. and i don't get that you even
> acknowledge you were wrong about it.

Ok, yes I was off with my initial assessment of defined() for
aggregates. I'm not above admitting that. I do think you could of gotten
your point across in a more diplomatic way and avoided all the extra
noise (which I'm also not above admitting may have partly been my fault
too for getting too worked up by it.)

I wasn't really disputing the documentation, though; I just feel it can
be useful to test weather an array or hash has been given a value since
it's inception, or if it has been run through the undef() function. I
can thing of a few scenarios where it maybe be useful to able to check
for such a state separately from being just empty, much like one might
test for undef vs. 0 or "".


--
G. C. Etly


stuart

unread,
Jun 18, 2008, 4:25:59 PM6/18/08
to
brian d foy wrote:

> In article
> <dfa1a2b1-0455-4bf1...@56g2000hsm.googlegroups.com>,
> Elizabeth Barnwell <elizabet...@gmail.com> wrote:
>
>> Here is a set of flashcards our developers have been using to learn
>> Perl with very good results:
>
[..]
>
> I guess the technology is okay, but I don't see the point of trying to
> learn a programming language without actually programming. Memorization
> isn't worth much when you should be able to look up anything you need
> at the same time you are programming.

I agree with brian (is agreement allowed in this thread?)
When I use Perl I have 4 xterms on the screen
1. File to be analysed (all my Perl programs analyse files)
2. The Perl program (in vi of course, but I guess we don't want to go there)
3. Here I run the program and read the errors
4. The research window. I normally end up with man perlfaq4 here, but often
its where I look at old programs that work, or other Perl manpages.

Summary, I don't remember anything parrot fashion, and therefore flashcards
wouldn't help me. What I need are old programs and the docs that come with
Perl. Thanks guys.

---
Stuart Flowers

Elizabeth Barnwell

unread,
Jun 18, 2008, 4:42:16 PM6/18/08
to
On Jun 18, 3:25 pm, stuart <stuart.flow...@t-online.de> wrote:
> brian d  foy wrote:
>
>
>
> > In article
> > <dfa1a2b1-0455-4bf1-9cf8-9525335f1...@56g2000hsm.googlegroups.com>,

> > Elizabeth Barnwell <elizabethbarnw...@gmail.com> wrote:
>
> >> Here is a set of flashcards our developers have been using to learn
> >> Perl with very good results:
>
> [..]
>
> > I guess the technology is okay, but I don't see the point of trying to
> > learn a programming language without actually programming. Memorization
> > isn't worth much when you should be able to look up anything you need
> > at the same time you are programming.
>
> I agree with brian (is agreement allowed in this thread?)
> When I use Perl I have 4 xterms on the screen
> 1. File to be analysed (all my Perl programs analyse files)
> 2. The Perl program (in vi of course, but I guess we don't want to go there)
> 3. Here I run the program and read the errors
> 4. The research window. I normally end up with man perlfaq4 here, but often
> its where I look at old programs that work, or other Perl manpages.
>
> Summary, I don't remember anything parrot fashion, and therefore flashcards
> wouldn't help me. What I need are old programs and the docs that come with
> Perl. Thanks guys.
>
> ---
> Stuart Flowers

Hi Stuart, Thanks for your feedback!

Best,

Elizabeth

Jim Cochrane

unread,
Jun 19, 2008, 7:00:41 PM6/19/08
to
On 2008-06-18, Gordon Corbin Etly <g> wrote:
> Uri Guttman wrote:
>>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:
>> > Uri Guttman wrote:
>> >>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:
>
>> > > see you don't get it. it isn't broken behavior but behavior that
>> > > shouldn't have been there to begin with. like my $x = 1 if 0 stuff
>> > > which does something that was bad but not deprecated until
>> > > recently.
>
>> > I do get it. Maybe tell nose thumbing would allow us to understand
>> > each other better.
>
>> huh?? and you don't get it. otherwise you wouldn't have been defending
>> the undefensible for so long. and i don't get that you even
>> acknowledge you were wrong about it.
>
> ...

>
> I wasn't really disputing the documentation, though; I just feel it can
> be useful to test weather an array or hash has been given a value since
> it's inception, or if it has been run through the undef() function.
> I can thing of a few scenarios where it maybe be useful to able to check
> for such a state separately from being just empty, much like one might
> test for undef vs. 0 or "".

What do you mean by "given a value"? Do you mean "has memory for the
array [or hash] been allocated?"?

If so, when you that knowledge be useful in a program?

--

Jim Cochrane

unread,
Jun 20, 2008, 4:55:13 AM6/20/08
to

Ugh - correction:

If so, when do you think that knowledge would be useful in a program?


--

Uri Guttman

unread,
Jun 20, 2008, 11:09:59 AM6/20/08
to
>>>>> "JC" == Jim Cochrane <allergic...@no-spam-allowed.org> writes:

JC> Ugh - correction:

JC> If so, when do you think that knowledge would be useful in a program?

i will be amazed and dazzled if he comes up with a use that all of p5p
and thousands of experienced perl hackers never thought of
before. considering that defined and undef are scalar concepts and
always have been, any use for them on aggregated is beyond our mortal
comprehension.

Ted Zlatanov

unread,
Jun 20, 2008, 2:06:29 PM6/20/08
to
On Fri, 20 Jun 2008 15:09:59 GMT Uri Guttman <u...@stemsystems.com> wrote:

UG> i will be amazed and dazzled if he comes up with a use that all of p5p
UG> and thousands of experienced perl hackers never thought of
UG> before. considering that defined and undef are scalar concepts and
UG> always have been, any use for them on aggregated is beyond our mortal
UG> comprehension.

This makes some sense to me from a Lisp perspective, where nil is an
empty list and a null value at the same time. Because Perl lists and
hashes are so different from Lisp structures, though, it just doesn't
translate well. In Lisp it can lead to some wonderfully concise code:

(cond
((null v) ...) ; it's empty
((stringp v) ...) ; it's a string
((listp v) ...) ; it's a list
((t) ...)) ; anything else

Implementing the same in Perl 5 is not as nice.

Ted

Gordon Corbin Etly

unread,
Jun 20, 2008, 4:12:32 PM6/20/08
to
Uri Guttman wrote:
>>>>>> "JC" == Jim Cochrane <allergic...@no-spam-allowed.org>
>>>>>> writes:
> > On 2008-06-19, Jim Cochrane <allergic...@no-spam-allowed.org>
> > wrote:
> > > On 2008-06-18, Gordon Corbin Etly <g> wrote:
> > > > Uri Guttman wrote:
> > > >>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:
> > > > > > Uri Guttman wrote:
> > > > > >>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com>
> > > > > >>>>>>> writes:

Just wondering, why do you use the '"ABC" == "Full Name"' declaraction
but not actually use it? Not hurting anything but seems odd.


> > > > > > > see you don't get it. it isn't broken behavior but
> > > > > > > behavior
> > > > > > > that shouldn't have been there to begin with. like my $x =
> > > > > > > 1 if 0 stuff which does something that was bad but not
> > > > > > > deprecated until recently.

> > > > > > I do get it. Maybe tell nose thumbing would allow us to
> > > > > > understand each other better.

> > > > > huh?? and you don't get it. otherwise you wouldn't have been
> > > > > defending the undefensible for so long. and i don't get that
> > > > > you even acknowledge you were wrong about it.

> > > > ...
> > > >
> > > > I wasn't really disputing the documentation, though; I just feel
> > > > it can be useful to test weather an array or hash has been given
> > > > a value since it's inception, or if it has been run through the
> > > > undef() function. I can thing of a few scenarios where it maybe
> > > > be useful to able to check for such a state separately from
> > > > being just empty, much like one might test for undef vs. 0 or
> > > > "".

> > > What do you mean by "given a value"? Do you mean "has memory for
> > > the array [or hash] been allocated?"?
> > >
> > > If so, when you that knowledge be useful in a program?

> > Ugh - correction:

> > If so, when do you think that knowledge would be useful in a
> > program?

> i will be amazed and dazzled if he comes up with a use that all of p5p
> and thousands of experienced perl hackers never thought of
> before.

In all honest I cannot think of a real word example, and I don't believe
I claimed one before. I just thought there could be situations (like
some complex class) where it needs to be known if any array or hash has
been initialized, but after taking some time to really think about it,
it indeed seems like a useless function, as all you really need to know
is if it contains anything.


> considering that defined and undef are scalar concepts and
> always have been, any use for them on aggregated is beyond our mortal
> comprehension.

This has become quite clear to me after having sat and gone over it a
bit. It comes to show there can be times when you feel something seems
so right and no one agrees and them bam, you suddenly see the light,
it's a nice feeling :) (I just wish you could of gotten your point
across in more pleasant terms, but we arrived in the right place, so
that's what really matters.)


--
G. C. Etly


Jim Cochrane

unread,
Jun 21, 2008, 4:52:55 AM6/21/08
to

Do you mean that since the empty set is a member of all sets, nil (the
empty set) is an empty list, an empty string, ...?

Makes sense.

I suppose Lisp is more mathematically consistent than Perl.

--

Jim Cochrane

unread,
Jun 21, 2008, 4:58:27 AM6/21/08
to

Yes, I think whether or not memory for the array (or hash) has been
allocated is just an implementation/optimization detail - not of
relevance to the program one is writing (unless, perhaps, one is writing
a perl compiler in perl [not sure if that is a good idea]). Since the
programmer does not have to explicilty allocate memory, he doesn't
really need to think about it.

[If one wants to worry about memory allocation, one can suffer with a
lower-level language, like C or C++ :-).]


--

Gordon Corbin Etly

unread,
Jun 21, 2008, 12:34:19 PM6/21/08
to
Jim Cochrane wrote:
> On 2008-06-20, Gordon Corbin Etly <g> wrote:
> > Uri Guttman wrote:
> > > "Jim Cochrane wrote:
> > > > On 2008-06-19, Jim Cochrane wrote:
> > > > > Gordon Corbin Etly wrote:

> > > > > ...

> > > > > > I wasn't really disputing the documentation, though; I just
> > > > > > feel it can be useful to test weather an array or hash has
> > > > > > been given a value since it's inception, or if it has been
> > > > > > run through the undef() function. I can thing of a few
> > > > > > scenarios where it maybe be useful to able to check for
> > > > > > such a state separately from being just empty, much like
> > > > > > one might test for undef vs. 0 or "".

> > > > > What do you mean by "given a value"? Do you mean "has memory
> > > > > for the array [or hash] been allocated?"?
> > > > >
> > > > > If so, when you that knowledge be useful in a program?

> > > > Ugh - correction:
> > > >
> > > > If so, when do you think that knowledge would be useful in a
> > > > program?

> > > i will be amazed and dazzled if he comes up with a use that all
> > > of p5p and thousands of experienced perl hackers never thought
> > > of before.

> > In all honesty I cannot think of a real word example, and I


> > don't believe I claimed one before. I just thought there could
> > be situations (like some complex class) where it needs to be known
> > if any array or hash has been initialized, but after taking some
> > time to really think about it, it indeed seems like a useless
> > function, as all you really need to know is if it contains anything.

> Yes, I think whether or not memory for the array (or hash) has been
> allocated is just an implementation/optimization detail - not of
> relevance to the program one is writing (unless, perhaps, one is
> writing a perl compiler in perl [not sure if that is a good idea]).
> Since the programmer does not have to explicilty allocate memory,
> he doesn't really need to think about it.

True, I agree. Though if experience has taught me anything, there may
always been unforeseen uses, although it seems rather unlikely in this
case.


> [If one wants to worry about memory allocation, one can suffer with a
> lower-level language, like C or C++ :-).]

Been there, done that :)


--
G. C. Etly


0 new messages