[30570] in Perl-Users-Digest
Perl-Users Digest, Issue: 1813 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 22 14:09:56 2008
Date: Fri, 22 Aug 2008 11:09:21 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 22 Aug 2008 Volume: 11 Number: 1813
Today's topics:
[OT] Re: printing two consecutive lines <1usa@llenroc.ude.invalid>
Re: CLPM - a help group? <worrall-unet@cs.bris.ca.uk>
Re: CLPM - a help group? <worrall-unet@cs.bris.ca.uk>
Re: CLPM - a help group? <worrall-unet@cs.bris.ca.uk>
Re: CLPM - a help group? <spamtrap@dot-app.org>
Re: CLPM - a help group? <cwilbur@chromatico.net>
Re: CLPM - a help group? <sbour@niaid.hin.gow>
Re: CLPM - a help group? <cwilbur@chromatico.net>
Re: CLPM - a help group? <ben@morrow.me.uk>
Re: CLPM - a help group? <sbour@niaid.hin.gow>
Re: CLPM - a help group? <spamtrap@dot-app.org>
Re: CLPM - a help group? <jurgenex@hotmail.com>
Re: CLPM - a help group? <jurgenex@hotmail.com>
Re: FAQ 4.44 How do I test whether two arrays or hashes <szrRE@szromanMO.comVE>
Re: Help: Debug perl codes <vron@byu.edu.invalid>
Re: Help: Debug perl codes <vron@byu.edu.invalid>
Re: how to report which specific variable is uninitiali <Peter@PSDT.com>
Re: Score files (was Re: CLPM - a help group?) <worrall-unet@cs.bris.ca.uk>
Re: Score files <spamtrap@dot-app.org>
Re: set default value for undefined variables <bugbear@trim_papermule.co.uk_trim>
Re: set default value for undefined variables <Peter@PSDT.com>
Re: The Importance of Terminology's Quality <gneuner2@comcast.net>
Re: Unable to debug Perl script <Peter@PSDT.com>
Re: Unable to debug Perl script <ben@morrow.me.uk>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 22 Aug 2008 16:37:32 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: [OT] Re: printing two consecutive lines
Message-Id: <Xns9B02806C9A6D9asu1cornelledu@127.0.0.1>
Sherm Pendley <spamtrap@dot-app.org> wrote in news:m14p5d278u.fsf@dot-
app.org:
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> writes:
>
>> As usual, beauty is in the eye of the beholder.
>
> I guess you never played D&D... Beholders are *ugly*! :-)
Didn't know that. I had not even heard of the game until I was in my
twenties. The game is not big in Turkey.
Having seen
http://www.wizards.com/dnd/images/leof_gallery/86716.jpg
that phrase will have an entirely different meaning for the rest of my
life.
Thanks ;-)
Sinan
--
A. Sinan Unur <1usa@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/
------------------------------
Date: Fri, 22 Aug 2008 09:04:19 -0700
From: Adam Worrall <worrall-unet@cs.bris.ca.uk>
Subject: Re: CLPM - a help group?
Message-Id: <8sBrk.17446$LG4.11923@nlpi065.nbdc.sbc.com>
Martijn Lievaart wrote:
> On Tue, 19 Aug 2008 00:16:54 -0700, Adam Worrall wrote:
>
>> Martijn Lievaart wrote:
>>> On Sat, 16 Aug 2008 10:36:21 -0700, Adam Worrall wrote:
>>>
>>>>> A help desk is a place where people can go with the expectation of
>>>>> receiving assistance, without commentary that isn't relevant to their
>>>>> questions.
>>>> There you go again. This does not really apply to a _volunteer_ help
>>>> desk where you are _not_ obligated to answer _anything_, which _how_
>>>> _this_ _group_ _functions_.
>>> That's not how a volunteer help desk functions, so stop pretending it
>>> is.
>> Yes it is. I've been on one, so I've been speaking from first hand
>> experience, so don't tell me how one functions. You just posted in one.
>
> I have first hand experience as well, and a volunteer helpdesk takes
> commitment from their volunteers, otherwise it would not function.
Not all help desks are created equal, as the one I was on obviously
functioned differently than yours. Mine functioned just fine, so please
do not make blanket statements.
> Who is available when, rosters and that kind of thing. You volunteer
> to take an obligation.
Not in all case you don't. In my help desk, and other like from what
I've been told, you are volunteering _you_ time, you are not being paid,
and therefore not required nor obligated to provide help to any _you_ do
not wish to help. It's that simple.
> Quite different from this group.
Again ,you're missing the point. There exists groups that do behave in a
comparable manner to this group, which was the point _I_ made before.
- Adam
------------------------------
Date: Fri, 22 Aug 2008 09:08:42 -0700
From: Adam Worrall <worrall-unet@cs.bris.ca.uk>
Subject: Re: CLPM - a help group?
Message-Id: <gwBrk.17447$LG4.12095@nlpi065.nbdc.sbc.com>
John Bokma wrote:
> Adam Worrall <worrall-unet@cs.bris.ca.uk> wrote:
>
>> John Bokma wrote:
>
>>> A nail can function like a screw, but that doesn't make a nail a
>>> screw, even though you have used one time a nail to replace a missing
>>> screw.
>> Fallacy; I nor anyone tried to say that this nail was a screw, but
>> that it was acting just like one.
>
> OK, acting as in "false behavior; pretense". Hence it is not a help desk.
You are still ignoring my comparison to a _real_ help desk I was on and
how this one functions, and you also _once_ _again_ ignored the fact
that I _never_ said this was a help desk, but that it _acted_ just like
one, such as the one I knew.
> So, no fallacy of mine. I just call this nail not a screw, while you
> prefer to go on and on how you can sometimes use a nail like a screw.
There you go again, I _NEVER_ said you can can use a "nail" like a
"screw"... this is just a bad example. It does not equate to the topic
at hand. Stop trying to find piss-poor ways to make a point and stop
ignoring things that I've said (otherwise you are making it appear that
I've said something I haven't, when you change the wording.)
- Adam
------------------------------
Date: Fri, 22 Aug 2008 09:25:35 -0700
From: Adam Worrall <worrall-unet@cs.bris.ca.uk>
Subject: Re: CLPM - a help group?
Message-Id: <4MBrk.17451$LG4.4912@nlpi065.nbdc.sbc.com>
John Bokma wrote:
> Adam Worrall <worrall-unet@cs.bris.ca.uk> wrote:
>
>> That's a rather loaded assumption on your part. Why are you assuming
>> we would come in to be rude?
>
> You understand what an example is?
I understand what a bad example is.
>> And after I already explained to you that
>> we had volunteered to help. I mean, I didn't say it was 100% like
>> CLPM, but that CLPM in general functions in a similar way.
>
> In a similar way is not identical.
So what, no one claimed they were, so please stop playing with words here.
> So there is nothing wrong with people explaining that this is NOT a helpdesk.
Yes there is. You and others scold others for pretending to be
authoritative if they even try to hint at saying this group is a help
desk, yet you yourselves act in the same sort of authoritative manner by
saying it isn't a help desk.
What makes your group of people more authoritative than anyone else,
when _no_ _one_ owns the group and _no_ _one_ has the right to carry the
pretense that they are some how aloud to create law in the group.
It's nothing short of bonified hypocrisy.
- Adam
------------------------------
Date: Fri, 22 Aug 2008 12:46:23 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: CLPM - a help group?
Message-Id: <m11w0h6lr4.fsf@dot-app.org>
Adam Worrall <worrall-unet@cs.bris.ca.uk> writes:
> Yes there is. You and others scold others for pretending to be
> authoritative if they even try to hint at saying this group is a help
> desk, yet you yourselves act in the same sort of authoritative manner
> by saying it isn't a help desk.
Nonsense. It's not a question of authority, it's one of accuracy. If I
state that water is made of hydrogen and oxygen, I'm not ordering the
universe to make water out of that, I'm simply describing how it's
already being made.
Same thing here - usenet is not a help desk. That's the reality. Deal
with it.
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Fri, 22 Aug 2008 12:49:45 -0400
From: Charlton Wilbur <cwilbur@chromatico.net>
Subject: Re: CLPM - a help group?
Message-Id: <86abf5atau.fsf@mithril.chromatico.net>
>>>>> "AW" == Adam Worrall <worrall-unet@cs.bris.ca.uk> writes:
AW> What makes your group of people more authoritative than anyone
AW> else,
The fact that they are actually contributing positively to the group.
AW> right to carry the pretense that they are some how aloud to
"allowed"
AW> It's nothing short of bonified hypocrisy.
"bona fide"
Perhaps you should start a habit of stopping and taking a deep breath
before posting. You're not adding anything to the group, and you're
making an ass out of yourself in public.
Charlton
--
Charlton Wilbur
cwilbur@chromatico.net
------------------------------
Date: Fri, 22 Aug 2008 09:53:12 -0700
From: "Stephan Bour" <sbour@niaid.hin.gow>
Subject: Re: CLPM - a help group?
Message-Id: <T7Crk.25309$Ri.5388@flpi146.ffdc.sbc.com>
Tad J McClellan wrote:
:: Stephan Bour <sbour@niaid.hin.gow> wrote:
::: John Bokma wrote:
::
::::: *ploink*
::
::
::: Tad J McClellan wrote:
::::: I did that 5 years ago.
:::
::: Not possible, since I wasn't here 5 years ago,
::
::
::
:: http://groups.google.com/group/comp.lang.perl.misc/msg/ee8bb90190c33d74
::
::
::
http://groups.google.com/groups/profile?enc_user=Z1NROBMAAADiU51oHQLTtd4xiCEEXKM6JLiykVkzDXJvZE77WC-J4Q
And fell right into my trap. You've become so predictable. I knew you'd go
right for the user-history. And what does this history show? It displays
exactly what is wrong with you and others like you in this group. Folk who
may have once been great helpers and a real assets to the CLPM community
(note, not referring to the same community that "Perl Community" necessarily
referrers to), but how, over the better part of a decade, many of you have
degraded into a disgruntled band of thugs who always assume the moral high
ground no matter how wrong or mistaken they are.
Thank you for giving more example of who and what many of you have become.
Stephan.
------------------------------
Date: Fri, 22 Aug 2008 13:03:20 -0400
From: Charlton Wilbur <cwilbur@chromatico.net>
Subject: Re: CLPM - a help group?
Message-Id: <863akxaso7.fsf@mithril.chromatico.net>
>>>>> "SB" == Stephan Bour <sbour@niaid.hin.gow> writes:
SB> And fell right into my trap. You've become so predictable. I
SB> knew you'd go right for the user-history. And what does this
SB> history show? It displays exactly what is wrong with you and
SB> others like you in this group.
No, it shows that when you said "I was not here five years ago," you
were lying. I'm not sure how noticing that or demonstrating it in
public view means that Tad is at fault.
Go troll elsewhere; we're on to you.
Charlton
--
Charlton Wilbur
cwilbur@chromatico.net
------------------------------
Date: Fri, 22 Aug 2008 18:10:07 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: CLPM - a help group?
Message-Id: <fg83o5-sr31.ln1@osiris.mauzo.dyndns.org>
Quoth Sherm Pendley <spamtrap@dot-app.org>:
> Adam Worrall <worrall-unet@cs.bris.ca.uk> writes:
>
> Nonsense. It's not a question of authority, it's one of accuracy. If I
Please stop responding to trolls. It's getting annoying.
Thanks,
Ben
--
#!/bin/sh
quine="echo 'eval \$quine' >> \$0; echo quined"
eval $quine
# [ben@morrow.me.uk]
------------------------------
Date: Fri, 22 Aug 2008 10:25:01 -0700
From: "Stephan Bour" <sbour@niaid.hin.gow>
Subject: Re: CLPM - a help group?
Message-Id: <PDCrk.20481$uE5.18021@flpi144.ffdc.sbc.com>
Charlton Wilbur wrote:
::::::: "SB" == Stephan Bour <sbour@niaid.hin.gow> writes:
::
::: And fell right into my trap. You've become so predictable. I
::: knew you'd go right for the user-history. And what does this
::: history show? It displays exactly what is wrong with you and
::: others like you in this group.
::
:: No, it shows that when you said "I was not here five years ago," you
:: were lying.
Perhaps, but it was necessary to make Tad prove my point for me. I knew
exactly what he would do, given his posting history.
:: I'm not sure how noticing that or demonstrating it in
:: public view means that Tad is at fault.
I never said he was at fault for simply noticing it, I said he fell into my
trap. Please don't put words in my mouth. You just prove me even more right
about people like you.
:: Go troll elsewhere; we're on to you.
And once again anyone who disagrees with or shows what you are, are labeled
the trolls. Isn't this getting rather cliché?
Stephan.
------------------------------
Date: Fri, 22 Aug 2008 13:29:59 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: CLPM - a help group?
Message-Id: <m1sksx5560.fsf@dot-app.org>
Ben Morrow <ben@morrow.me.uk> writes:
> Quoth Sherm Pendley <spamtrap@dot-app.org>:
>> Adam Worrall <worrall-unet@cs.bris.ca.uk> writes:
>>
>> Nonsense. It's not a question of authority, it's one of accuracy. If I
>
> Please stop responding to trolls. It's getting annoying.
Actually, I don't think Adam began this as an intentional troll. He's
obviously confused, but I think that's genuine, not trolling. Call it
the triumph of hope over experience, if you will.
But you're right - Adam's argued himself into a corner at this point,
and can't bring himself to admit that he's wrong, no matter how many
times it's explained to him. Further attempts to help him understand
how this group works would probably be pointless and met with more of
the same kind of responses.
Sadly, some people just can't be helped. :-(
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Fri, 22 Aug 2008 17:34:15 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: CLPM - a help group?
Message-Id: <80uta4l3mn003naehf6qj2nriejo9ch0ho@4ax.com>
"Stephan Bour" <sbour@niaid.hin.gow> wrote:
>http://groups.google.com/groups/profile?enc_user=Z1NROBMAAADiU51oHQLTtd4xiCEEXKM6JLiykVkzDXJvZE77WC-J4Q
>
>And fell right into my trap. You've become so predictable. I knew you'd go
>right for the user-history. And what does this history show? It displays
>exactly [...]
... the contributions _YOU_ made to this group, none of which are of any
actual benefit to anyone.
I thought I plonked you a long time ago, maybe your entry expired. Well,
that's easy to fix.
jue
------------------------------
Date: Fri, 22 Aug 2008 17:35:41 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: CLPM - a help group?
Message-Id: <56uta4tf7qgvk1708g0j52tfoqo25vo7gs@4ax.com>
Adam Worrall <worrall-unet@cs.bris.ca.uk> wrote:
>It's nothing short of bonified hypocrisy.
Whatever. Go play in your sand box and leave daddy's computer alone.
*PLONK*
jue
------------------------------
Date: Fri, 22 Aug 2008 10:44:44 -0700
From: "szr" <szrRE@szromanMO.comVE>
Subject: Re: FAQ 4.44 How do I test whether two arrays or hashes are equal?
Message-Id: <g8mtud077v@news4.newsguy.com>
PerlFAQ Server wrote:
[...]
>
> 4.44: How do I test whether two arrays or hashes are equal?
>
> With Perl 5.10 and later, the smart match operator can give you the
> answer with the least amount of work:
>
> use 5.010;
>
> if( @array1 ~~ @array2 )
> {
> say "The arrays are the same";
> }
>
> if( %hash1 ~~ %hash2 ) # doesn't check values!
> {
> say "The hash keys are the same";
> }
For testing hashes, I think the smart match operator can confuse people
who don't realize it doesn't compare the values in the hash, as I
wouldn't blame some people for thinking an evaluation of true means both
hashes are identical.
Is there any technical reason it doesn't compare hash values?
--
szr
------------------------------
Date: Fri, 22 Aug 2008 09:38:04 -0700
From: "Vernan R." <vron@byu.edu.invalid>
Subject: Re: Help: Debug perl codes
Message-Id: <cu6dnYKGNajwdjPVnZ2dnUVZ_oPinZ2d@wavecable.com>
Sherm Pendley wrote:
> "Vernan R." <vron@byu.edu.invalid> writes:
>
>> Sherm Pendley wrote:
>>
>>> Sadly, no matter how patient one is, or how many helpful fishing
>>> lessons one gives, there will inevitably be someone in the
>>> audience who feels entitled to a free fish dinner instead.
>>
>> I don't understand your reasoning. If you are saying the OP
>> was seeking free fish, then you are clearly mistaken. If
>> you are saying he who corected those presuming the question
>> to be a FAQ, then you are also wrong.
>
> Please don't put words in my mouth - if I had meant to say either of
> those things, I would have. The OP's question was perfectly valid, not
> in the FAQ, and those who directed her to the FAQ were mistaken.
I didn't insert any words into your mouth. Perhaps you are
unfamiliar with the meaning of "if."
That said, you -/did/- imply that the OP may have been seeking
a free fish.
You also appeared to be giving those who acted wrongly a free
pass, acting as if OP was the party who has acted incorrectly.
This is not inserting words into your mouth, this is reading
what you have written and extrapolating from what you didn't
write at the same time - a.k.a, critical thinking.
> There are a handful of people here who *did* demand answers that would
> have been *trivially* answered with the most cursory search in the
> docs.
I have not seen any such individuals in this thread thus far,
but if I missed one, then feel free to provide a link or
message id.
--
-Vern
------------------------------
Date: Fri, 22 Aug 2008 09:42:53 -0700
From: "Vernan R." <vron@byu.edu.invalid>
Subject: Re: Help: Debug perl codes
Message-Id: <aJCdnZ8IVtwTcTPVnZ2dnUVZ_j2dnZ2d@wavecable.com>
Sherm Pendley wrote:
> "Thrill5" <nospam@somewhere.com> writes:
>
>> "Sherm Pendley" <spamtrap@dot-app.org> wrote in message
>> news:m17iab8clu.fsf@dot-app.org...
>>>
>>> Of course not. What I take objection to is the popular notion among
>>> whiners (including the one to whom the OP had responded) that such
>>> things are intentional attacks. The picture that these people paint,
>>> of being irrationally "attacked" by regulars who "hate newbies," is
>>> nothing but a ridiculous caricature.
>>
>> My "rant" was directed only to the bullies that like to ridicule
>> posters because *they think* someone asked a dumb question.
>
> Exactly my point. When regulars make mistakes, you describe them as
> "bullies" who "like to ridicule" people. You refuse to consider that
> it was an honest mistake brought about by misinterpreting the OP's
> question; instead, you whine and rant about a hidden agenda that
> exists only in your imagination.
I'm sorry to says that this is most like due to the
frequency at which such "mistakes" occur around here. If
they were just occasional mistakes that happened around
once a month or greater, then I doubt very many people
would think much of it, but the truth is many "regulars"
has gotten such reputations not without any reason what
so ever.
--
-Vern
------------------------------
Date: Fri, 22 Aug 2008 16:56:53 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: how to report which specific variable is uninitialized
Message-Id: <pan.2008.08.22.16.56.53.89687@PSDT.com>
On Thu, 21 Aug 2008 10:00:46 -0700, Morfys wrote:
> On Aug 21, 6:53 pm, Sherm Pendley <spamt...@dot-app.org> wrote:
>> Morfys <morfyss...@gmail.com> writes:
>> > When running perl with the -w option, and executing a "print'" with
>> > about 30 variables, I get
>>
>> > Use of uninitialized value in print at at ./temp.pl line 9.
>>
>> > Is there any way to make perl report the exact variable name (out of
>> > the 30) that is not initialized?
> Ok, I just thought there might some cool way to do it in perl with one
> line. ;)
There is. The line is:
use 5.010;
:-)
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
------------------------------
Date: Fri, 22 Aug 2008 09:13:02 -0700
From: Adam Worrall <worrall-unet@cs.bris.ca.uk>
Subject: Re: Score files (was Re: CLPM - a help group?)
Message-Id: <iABrk.17448$LG4.16840@nlpi065.nbdc.sbc.com>
Sherm Pendley wrote:
> sln@netherlands.com writes:
>
>> Please title your personal software "Kill" tactics appropriately!
>
> He *did* change the subject when the topic drifted. What part of
> "Score files (was Re: CLPM - a help group?)" doesn't make that clear
> to you?
I stayed exactly on the subject, can't speak for everyone else though.
But this kill file business is just another indication of going off the
deep end - it's a personal utility, so please keep it personal and talk
about it over email, just as you've told others to do for such things in
the past.
- Adam
------------------------------
Date: Fri, 22 Aug 2008 12:41:54 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Score files
Message-Id: <m163pt6lyl.fsf@dot-app.org>
Adam Worrall <worrall-unet@cs.bris.ca.uk> writes:
> though. But this kill file business is just another indication of
> going off the deep end - it's a personal utility, so please keep it
> personal and talk about it over email, just as you've told others to
> do for such things in the past.
You don't know much about usenet, do you? First, you claim that it's a
help desk, and now this...
The meta-topic of NNTP client apps has traditionally been considered
on-topic in all usenet groups, since everyone here is using such a
client. The same is true of discussions about netiquette.
With all due respect, I suggest that you put more time into learning
what usenet *is*, before trying to change it into something else.
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Fri, 22 Aug 2008 15:41:50 +0100
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: set default value for undefined variables
Message-Id: <PL-dnYpvitKzTTPVnZ2dnUVZ8qPinZ2d@posted.plusnet>
Morfys wrote:
> Is there a way to set the default value for undefined variables? For
> example, in
>
> my ($a, $b) = (split(/\s+/, $mytext))[0,1]
>
> sometimes mytext will contain two (or more) words, and sometimes it
> will contain only 1. In the latter case, I would like $b to be
> initialized to "" not undef.
>
> I have many statements (>60) of the above form with different
> variables, and initializing
> each variable $a = ""; b = ""; is a pain. Thanks.
>
It would be easy to write a routine which took an array,
and returned a new array, with undef replaced by "",
and the new array padded (again with "") to as many
items as you need.
Given this KLUDGE
my ($a, $b) = kludged(split(/\s+/, $mytext));
Does what you want.
But as others have suggested, reworking/refactoring
your code is likely a better path to go down.
BugBear
------------------------------
Date: Fri, 22 Aug 2008 16:54:34 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: set default value for undefined variables
Message-Id: <pan.2008.08.22.16.54.34.154961@PSDT.com>
On Thu, 21 Aug 2008 09:56:17 -0700, Morfys wrote:
> Is there a way to set the default value for undefined variables? For
> example, in
>
> my ($a, $b) = (split(/\s+/, $mytext))[0,1]
>
> sometimes mytext will contain two (or more) words, and sometimes it
> will contain only 1. In the latter case, I would like $b to be
> initialized to "" not undef.
>
> I have many statements (>60) of the above form with different
> variables, and initializing
> each variable $a = ""; b = ""; is a pain. Thanks.
Repetition is soul-destroying. In addition to the other suggestions made,
I would add that I think your code could be better designed. Perl has the
undefined value for a reason and it is usually a useful one. For you to
erase the distinction between undef and empty string without just using
Perl's boolean context to do it for you automatically, strikes me as a
design in need of improvement. Furthermore, sixty plus statements all
initializing variables at the same scope from split()s will make anyone's
eyes glaze over. If you want this code to be a lot easier to work with,
figure out how to factor out the repetition.
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
------------------------------
Date: Fri, 22 Aug 2008 11:11:09 -0400
From: George Neuner <gneuner2@comcast.net>
Subject: Re: The Importance of Terminology's Quality
Message-Id: <s2lta4lorjk49dn3joo3gj3juc8rfqqinf@4ax.com>
On Thu, 21 Aug 2008 02:30:27 GMT, sln@netherlands.com wrote:
>On Wed, 20 Aug 2008 21:18:22 -0500, rpw3@rpw3.org (Rob Warnock) wrote:
>
>>Martin Gregorie <martin@see.sig.for.address.invalid> wrote:
>>+---------------
>>| I was fascinated, though by the designs of early assemblers: I first
>>| learnt Elliott assembler, which required the op codes to be typed on
>>| octal but used symbolic labels and variable names. Meanwhile a colleague
>>| had started on a KDF6 which was the opposite - op codes were mnemonics
>>| but all addresses were absolute and entered in octal. I always wondered
>>| about the rationale of the KDF6 assembler writers in tackling only the
>>| easy part of the job.
>>+---------------
>>
>>In the LGP-30, they used hex addresses, sort of[1], but the opcodes
>>(all 16 of them) had single-letter mnemonics chosen so that the
>>low 4 bits of the character codes *were* the correct nibble for
>>the opcode! ;-}
>>
>>[Or you could type in the actual hex digits, since the low 4 bits
>>of *their* character codes were also their corresponding binary
>>nibble values... "but that would have been wrong".]
>>
>>
>>-Rob
>>
>>[1] The LGP-30 character code was defined before the industry had
>> yet standardized on a common "hex" character set, so instead of
>> "0123456789abcdef" they used "0123456789fgjkqw". [The "fgjkqw"
>> were some random characters on the Flexowriter keyboard whose low
>> 4 bits just happened to be what we now call 0xa-0xf]. Even worse,
>> the sector addresses of instructions were *not* right-justified
>> in the machine word (off by one bit), plus because of the shift-
>> register nature of the accumulator you lost the low bit of each
>> machine word when you typed in instructions (or read them from
>> tape), so the address values you used in coding went up by *4*!
>> That is, machine locations were counted [*and* coded, in both
>> absolute machine code & assembler] as "0", "4", "8", "j", "10",
>> "14", "18", "1j" (pronounced "J-teen"!!), etc.
>>
>>-----
>>Rob Warnock <rpw3@rpw3.org>
>>627 26th Avenue <URL:http://rpw3.org/>
>>San Mateo, CA 94403 (650)572-2607
>
>
>Whats os interresting about all this hullabaloo is that nobody has
>coded machine code here, and know's squat about it.
A friend of mine had an early 8080 micros that was programmed through
the front panel using knife switches ... toggle in the binary address,
latch it, toggle in the binary data, latch it, repeat ad nauseam. It
had no storage device initially ... to use it you had to input your
program by hand every time you turned it on.
I did a little bit of programming on it, but I tired of it quickly.
As did my friend - once he got the tape storage working (a new prom)
and got hold of a shareware assembler, we hardly ever touched the
switch panel again. Then came CP/M and all the initial pain was
forgotten (replaced by CP/M pain 8-).
>I'm not talking assembly language. Don't you know that there are routines
>that program machine code? Yes, burned in, bitwise encodings that enable
>machine instructions? Nothing below that.
>
>There is nobody here, who ever visited/replied with any thought relavence that can
>be brought foward to any degree, meaning anything, nobody....
What are you looking for? An emulator you can play with?
Machine coding is not relevant anymore - it's completely infeasible to
input all but the smallest program. My friend had a BASIC interpreter
for his 8080 - about 2KB which took hours to input by hand and heaven
help you if you screwed up or the computer crashed.
>sln
George
------------------------------
Date: Fri, 22 Aug 2008 16:44:45 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: Unable to debug Perl script
Message-Id: <pan.2008.08.22.16.44.44.620582@PSDT.com>
On Thu, 21 Aug 2008 11:15:00 -0400, smallpond wrote:
> FWIW, google finds a short method of generating this error.
>
> This is perl, v5.8.8 built for i386-linux-thread-multi
>
> perl -Te '@{%h}{x}'
> Bizarre copy of HASH in leave at -e line 1.
Elegant. Looks fixed in 5.10. Either change 27350 or 25808.
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
------------------------------
Date: Fri, 22 Aug 2008 18:32:56 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Unable to debug Perl script
Message-Id: <8r93o5-en41.ln1@osiris.mauzo.dyndns.org>
Quoth Peter Scott <Peter@PSDT.com>:
> On Thu, 21 Aug 2008 11:15:00 -0400, smallpond wrote:
> > FWIW, google finds a short method of generating this error.
> >
> > This is perl, v5.8.8 built for i386-linux-thread-multi
> >
> > perl -Te '@{%h}{x}'
> > Bizarre copy of HASH in leave at -e line 1.
>
> Elegant. Looks fixed in 5.10. Either change 27350 or 25808.
I should perhaps point out that this doesn't mean what you might think,
and that in 5.10 its meaning has also been fixed.
~% perl5.8.8 -le'%h = qw/a b/; %{"1/8"} = qw/a c/; print @{%h}{a}'
b
~% perl5.10.0 -le'%h = qw/a b/; %{"1/8"} = qw/a c/; print @{%h}{a}'
c
Perl used to allow you to treat a hash or array as a reference to
itself; this was a bug, and has now been (partly) fixed. The way the
expression now evaluates is
Evaluate %h in scalar context -> '1/8'
Evaluate @{'1/8'}{a} as a symbolic ref
which is why the above gives 'c'. But since 5.8 and earlier incorrectly
sliced %h rather than %{'1/8'}, you can't rely on this. (It would be
stupid behaviour to rely on, in any case, since the exact value of a
hash in scalar context has never been guaranteed. The only formal
statement in the docs is that the value will be true iff the hash has
any elements.)
Under 'use strict' you get 'Can't use string ("1/8") as a HASH
reference' with perls at least as far back as 5.6.1, so this won't be a
problem in any normal code. If you want to slice %h, the correct syntax
is simply
@h{a}
Ben
--
"If a book is worth reading when you are six, * ben@morrow.me.uk
it is worth reading when you are sixty." [C.S.Lewis]
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 1813
***************************************