[12643] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 52 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 7 10:15:46 1999

Date: Wed, 7 Jul 1999 07:07:34 -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           Wed, 7 Jul 1999     Volume: 9 Number: 52

Today's topics:
    Re: Top 10 responses to the Robot/email idea <garyg@gator.net>
    Re: Top 10 responses to the Robot/email idea <flavell@mail.cern.ch>
    Re: Top 10 responses to the Robot/email idea (Alf Huckitt)
    Re: Top 10 responses to the Robot/email idea <uri@sysarch.com>
    Re: Top 10 responses to the Robot/email idea (Alf Huckitt)
    Re: Top 10 responses to the Robot/email idea (Benjamin Franz)
    Re: Top 10 responses to the Robot/email idea (Alf Huckitt)
    Re: Top 10 responses to the Robot/email idea (Alf Huckitt)
    Re: Top 10 responses to the Robot/email idea <uri@sysarch.com>
    Re: Top 10 responses to the Robot/email idea (Andrew Johnson)
    Re: Top 10 responses to the Robot/email idea <sjs@yorku.ca>
    Re: Top 10 responses to the Robot/email idea <sjs@yorku.ca>
    Re: Top 10 responses to the Robot/email idea (Tad McClellan)
    Re: Top 10 responses to the Robot/email idea (Ronald J Kimball)
    Re: Top 10 responses to the Robot/email idea <bjm@a2b01118.paralynx.bconnected.net>
        Translations <troyknight@troyknight.eurobell.co.uk>
    Re: Translations (Abigail)
    Re: Translations <troyknight@troyknight.eurobell.co.uk>
        Unexpected behavior of Perl classes biagio@my-deja.com
    Re: Unexpected behavior of Perl classes <rick.delaney@home.com>
    Re: Unexpected behavior of Perl classes ()
    Re: Unix CGI > Win/Mac (Chris Nandor)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 04 Jul 1999 09:03:27 -0400
From: "Gary M. Greenberg" <garyg@gator.net>
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <377F5B9F.517B6897@gator.net>

John Nolan aka nospam@domain.com wrote:
> 
> : + Notice I don't post many questions here? It's not because I don't have
> : + any perl questions - I got a million of 'em. I just know how to
> : + find most of the answers now. It works.
> Yes, I agree with you.  I myself fall into the same category.
I'd guess a lot of us fall into that category.
But, I think the noise in many large language unmoderated groups is
similar.
I see it like this: there are five primary divisions of Perl posters in
c.l.p.misc:

   1. Those who want to _learn_ Perl and be Perl programmers.
   2. Those who simply want/need to use Perl to accomplish something but
      don't (necessarily) care to learn it (or anything).
   3. Those who need/want to accomplish something, don't want to learn
      anything AND are using Perl and c.l.p.misc to get a solution.
   4. Those who know just about everything && are fed up with those in
#3
      and flame anyone who remotely appears to fit that description.
   5. Those who who just about as much (or know as much) as those in #4
      AND have some sense of humanity.

> What I was objecting to was the snide/rude comments that accompany
> the replies.  I think there's too much of it.
Agreed; there is absolutely NO cause for anyone who isn't directly
assaulted to be rude to another because they don't like the questions or
the n-s ratio ;-}


> I still think that there's no such thing as a stupid question.
Ooooh; I couldn't disagree LESS (but that's a different story  ;p).

> A person who posts a FAQ is not a moron
Not they are not a moron. And, they don't deserve to be flamed.
However, if the record (the history of their posts) indicates
directly that they consistently ask FAQs, then they deserve to
receive DIRECT albeit respectful email discussing that fact.
Posting FAQs ad nauseum is an indication of disrespect for the
rest of this community (obv. => imo).

I'd add one more thing relevant to this discussion:
IMO, there is NO WAY anyone except a highly proficient, experienced, and
seasoned Perl programmer is going to avoid posting a question that's
been
answered before. The reason I say this is because there's so much to
learn:
I haven't read the FAQ lately, I've read the Perl Docs (once), and I've
read
the Llama and the Camel several times. I'm currently also reading Adv.
PP,
and I regularly read TPJ. And YET, I still learn something I missed the
first time through one of the resources I've already read.
So, the key to knowing whether a poster is learning and simply needs
assistance
and a pointer OR is a consistent FAQ poster who should be approached and
spoken with is to have a history of their posts. Once it's clear that
the
individual intends to disabuse the group, then it is appropriate for
them to
receive a fair amount of email that (without being rude) communicates
why
it is incorrect and should stop.


Gary
	Putting out fire with gasoline.


------------------------------

Date: Sun, 4 Jul 1999 16:23:26 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <Pine.HPP.3.95a.990704161221.189C-100000@hpplus03.cern.ch>

On Sun, 4 Jul 1999, Gary M. Greenberg wrote:

> However, if the record (the history of their posts) indicates
> directly that they consistently ask FAQs, then they deserve to
> receive DIRECT albeit respectful email discussing that fact.
> Posting FAQs ad nauseum is an indication of disrespect for the
> rest of this community (obv. => imo).

You say that someone who has exhibited a consistent record of contempt
for a usenet group _deserves_ a respectful response?  While it may be
politically and diplomatically wise to couch responses in a respectful
language, I don't see how you can argue that a response in such terms
can be described as "deserved".

And only a private response? (in many cases there will be no valid email
address anyway, but that's a different story).  I can't help thinking
that misbehaviour that's left uncontradicted in public is likely to act
as a model for others to copy.

best regards



------------------------------

Date: Sun, 04 Jul 1999 15:02:28 GMT
From: jam@jambutty7.freeserve.co.uk (Alf Huckitt)
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <377f7747.18435609@news.freeserve.co.uk>

>I would tend to disagree. A person who posts a FAQ has :
>
>  * Certainly not looked at news.announce.newusers
>
>  * Certainly not bothered to look at the documentation that comes
>    with Perl

I ask rather simple questions that are probably answered in the perl
documents. 
However I am a poorly educated person (not my fault) and although
reading is certainly easier than my slightly illiterate writing I have
to say I get lost in the perl docs. far too many big words and phrases
that I have no idea what they mean. I find them very confusing. Sorry
but thats the way it is for me. So i struggle along.

I ask my questions in the newsgroups to try and find an easier answer.
not a easy answer where the job is done for me. but an easier and
simple put detailed answer that leaves nothing to the imagination and
doesnt take a gcse in english:)

If my questions are too easy for the newsgroup. and the perl docs are
too hard for me to understand. then apart from giving up which I
refuse to do. then where do you suggest I go for help?




------------------------------

Date: 04 Jul 1999 12:54:33 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <x7908wz77a.fsf@home.sysarch.com>

>>>>> "AH" == Alf Huckitt <jam@jambutty7.freeserve.co.uk> writes:

i have stayed out of this flame war (which i started!) up until now.

  AH> I ask my questions in the newsgroups to try and find an easier answer.
  AH> not a easy answer where the job is done for me. but an easier and
  AH> simple put detailed answer that leaves nothing to the imagination and
  AH> doesnt take a gcse in english:)

  AH> If my questions are too easy for the newsgroup. and the perl docs are
  AH> too hard for me to understand. then apart from giving up which I
  AH> refuse to do. then where do you suggest I go for help?

take a class. use a dictionary to explain the words you don't
understand. read a crappy book which uses simple words (but has mistakes
and bugs). hire a tutor. hire a programmer to to the project for you. go
to the conferences/tutorials. this group is not the primary perl
resource out there and it most definitely is not a good place to learn
perl (or other computer stuff). it is meant to discuss perlish
stuff.

newbie questions are usually FAQ and should be dealt with as such. if
they followed netiquette and did their homework they ususally get better
responses. note the threads that get good answers vs. the ones who get
RTFM'ed. 

programming is not for everybody. i wish that were understood. i can
drive a car but that does not qualify me for daytone. do newbies invade
the legal, medical or other professions? somehow because you can write a
simple program in vb, newbies think they can do any program. many of us
have went to 4+ years of college, read and studied many books etc. to
get where we are today. we cannot convey that experience to anyobody in
the terms they want. in any profession there is a minimal entry barrier
and that is usually the terminology. the docs are written with that
entry level in mind. if you don't get those words, then maybe you should
not be a programmer. i wish more newbies woudl think about their choice
in this area. stick to vb if you won't put in the effort to properly
learn computer science and engineering. there is a big gulf between that
and just programming.

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


------------------------------

Date: Sun, 04 Jul 1999 18:20:05 GMT
From: jam@jambutty7.freeserve.co.uk (Alf Huckitt)
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <377fa2bb.29561407@news.freeserve.co.uk>

While Uri Guttman <uri@sysarch.com> was eating a Jam Butty.....

>  AH> If my questions are too easy for the newsgroup. and the perl docs are
>  AH> too hard for me to understand. then apart from giving up which I
>  AH> refuse to do. then where do you suggest I go for help?
>
>take a class. use a dictionary to explain the words you don't

So you mean do anything but whatever you do. don't ask the experts in
comp.lang.perl.misc. 

>programming is not for everybody. i wish that were understood. i can

programming is for anyone with the bottle to try it. some of us have
higher hurdles to overcome and bigger mountains to climb so we do the
best we can. but you are telling us not to bother learning. 

So are you just going to throw your rattle out of the pram or do you
think you might answwer the question with something other than telling
me not to learn perl ?




------------------------------

Date: Sun, 04 Jul 1999 18:53:34 GMT
From: snowhare@long-lake.nihongo.org (Benjamin Franz)
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <O4Of3.463$_M.23033@typhoon-sf.snfc21.pbi.net>

In article <377fa2bb.29561407@news.freeserve.co.uk>,
Alf Huckitt <jam@jambutty7.freeserve.co.uk> wrote:
>While Uri Guttman <uri@sysarch.com> was eating a Jam Butty.....
>
>>  AH> If my questions are too easy for the newsgroup. and the perl docs are
>>  AH> too hard for me to understand. then apart from giving up which I
>>  AH> refuse to do. then where do you suggest I go for help?
>>
>>take a class. use a dictionary to explain the words you don't
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...]

>So are you just going to throw your rattle out of the pram or do you
>think you might answwer the question with something other than telling
>me not to learn perl ?

He told you how to learn Perl if you find the documentation too hard. 

You didn't listen.

What you want is to be spoon fed programming and Perl for free - and i
we are telling you that isn't on the menu.

Either you can buckle down and learn to program on your own (which 
will take a couple of years of working at to achieve any real
competency) or you can surrender the cash to experts who make their 
living teaching people how to program to get you over the primary
hump in a month or two. Or a combination of the two.

But we aren't going to spend our time spoonfeeding you for free.

-- 
Benjamin Franz

 It has been my experience that 'anyone can program' is about as true 
 as 'anyone can compose music'. After years of study and much
 creation of complete garbage, _some_ people can create something
 that can be considered good music. The rare genius can even create
 _great_ music. Why would people believe that programming is any
 easier to learn than any other highly structured creative art?


------------------------------

Date: Sun, 04 Jul 1999 19:27:11 GMT
From: jam@jambutty7.freeserve.co.uk (Alf Huckitt)
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <3780b348.33799030@news.freeserve.co.uk>

While snowhare@long-lake.nihongo.org (Benjamin Franz) was eating a Jam
Butty.....

>What you want is to be spoon fed programming and Perl for free - and i
>we are telling you that isn't on the menu.

If you care to take the time and effort to read the thread you will
see that I explained I posted not for ready made scripts, I explained
I would be looking for easier to follow answers and not have the job
done for me. 

Maybe you accidently missed that bit ?
>
>Either you can buckle down and learn to program on your own (which 

 like everyone, you him me and a million others we can never know it
all. we all need to ask a question at some time, you seem to think
only the questions you deem hard are allowed.

I will ask in newsgroups and hopefully someone will help. if they do
then great, if not then try another or whatever it takes, but having
people tell me not to learn perl or to stick to VB of which i never
even tried is just pathetic, having to suffer redicule every time we
ask questions that are deemed too easy is... well lame is the only
word i can think of.

>will take a couple of years of working at to achieve any real

Ho you dont say, and how long have i been trying ?. you have no idea
have you ?. yet you feel knowledgeable enough to tell me. did you also
miss the bit where i pointed out some of us have bigger hurdles than
other. Just how much of my message did you read before jumping on the
bandwagon because to be perfectly honest you seem to be taking more
notice of your mate and very little notice of anything i said.

>competency) or you can surrender the cash to experts who make their 
>living teaching people how to program to get you over the primary
>hump in a month or two. Or a combination of the two.

so you agree with the original poster, I can use anything to learn
Perl but so long as it doesnt involve asking the experts in
comp.lang.misc thats what you are saying is it?, well thats 2 of you
then.
>
>But we aren't going to spend our time spoonfeeding you for free.

Please do take the time to read my message before having a pop at me.
I already pointed out in my first post that i was looking to learn and
not to have it done for me. guess that doesnt count for much around
here :(




------------------------------

Date: Sun, 04 Jul 1999 19:31:56 GMT
From: jam@jambutty7.freeserve.co.uk (Alf Huckitt)
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <3781b5a7.34406352@news.freeserve.co.uk>


>>>  AH> If my questions are too easy for the newsgroup. and the perl docs are
>>>  AH> too hard for me to understand. then apart from giving up which I
>>>  AH> refuse to do. then where do you suggest I go for help?
>>>

I voiced an opinion and asked a question, I may not have said it right
but i didnt swear or be nasty, but you knew what i meant, this
helpfull newsgroup not only responded in the negative and told me not
to bother learning perl (unbelievable) but my post also got me three
nasty emails

i think i will go and learn c or soemthing, maybe they wont spit on me
when i talk :(

unsubscribing. good bye :(

--
* Tough audience Wilf, Yeagh I noticed Alf *





------------------------------

Date: 04 Jul 1999 15:40:33 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <x76740yzim.fsf@home.sysarch.com>

>>>>> "AH" == Alf Huckitt <jam@jambutty7.freeserve.co.uk> writes:

  >> Either you can buckle down and learn to program on your own (which 

  AH>  like everyone, you him me and a million others we can never know it
  AH> all. we all need to ask a question at some time, you seem to think
  AH> only the questions you deem hard are allowed.

  AH> I will ask in newsgroups and hopefully someone will help. if they do
  AH> then great, if not then try another or whatever it takes, but having
  AH> people tell me not to learn perl or to stick to VB of which i never
  AH> even tried is just pathetic, having to suffer redicule every time we
  AH> ask questions that are deemed too easy is... well lame is the only
  AH> word i can think of.

but you complained the docs used words you didn't understand. that is
the crux of my post. we cannot explain each and every term used in the
docs to you. there has to be a certain level of competency for efficient
communication to take place. if i refer to an aggregate and you don't
get the term, i can't always explain it or use soem longer version like
"a perl data type which hold multiple values such as an array or hash"
and then have to explain arrays and hashes!

  >> will take a couple of years of working at to achieve any real

  AH> so you agree with the original poster, I can use anything to learn
  AH> Perl but so long as it doesnt involve asking the experts in
  AH> comp.lang.misc thats what you are saying is it?, well thats 2 of you
  AH> then.

no, that is not what we said. we have no problem answering legitimate
questions. the definition of legitimate is the issue. do we answer any
question or do we expect a certain level or perl knowledge? do we expect
other resources to be researched first? yes. if you are then stuck, this
is a good place to go for an answer, but it should be a late choice and
not the first place you jump to. c.l.p.misc is a discussion group on
perl not a perl and compsci tutorial. you are expected to knwo some perl
and hopefully some compsci (i wish that were true), before posting
here. perl's curse is that it is too popular with the unwashed masses so
we get, "i just read perl for morons (since i am a moron), what is a
hash? the book uses that term a lot and i don't get it." to that newbie,
i say get another job and don't be a programmer. 

  AH> Please do take the time to read my message before having a pop at me.
  AH> I already pointed out in my first post that i was looking to learn and
  AH> not to have it done for me. guess that doesnt count for much around
  AH> here :(

not true at all. did you post a real question? with code snippets? with
a clear problem stated? most posts which do that get good responses.

uri


-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


------------------------------

Date: Sun, 04 Jul 1999 20:10:54 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <idPf3.1827$SH6.81656@news1.rdc2.on.home.com>

In article <3780b348.33799030@news.freeserve.co.uk>,
 Alf Huckitt <jam@jambutty7.freeserve.co.uk> wrote:

[snip]

! >But we aren't going to spend our time spoonfeeding you for free.
! 
! Please do take the time to read my message before having a pop at me.
! I already pointed out in my first post that i was looking to learn and
! not to have it done for me. guess that doesnt count for much around
! here :(

that's great that you want to learn rather than just being given
the answers --- but clpm is not meant to be an introductory class
in Perl, and certainly not an introductory class in programming.

If you cannot locate a class or book that teaches on your level,
that does not put the responsibility of teaching you on this
group.

Now, without making any direct accusation about you or your posting
habits personally, the basic sentiment you seem to be communicating
in your arguments throughout this thread appears to be:

    I find the documentation to be written at a level above my
    current level of understanding (of Perl, of programming in
    general), therefore, I am asking this group to serve as tutors
    --- and not just any kind of tutors, but tutors who will strive
    to understand the limits of my past education and spend extra
    time teaching whatever prerequisite knowledge may be necessary.
    (whether that be basic Perl, basic programming, or basic
    terminology)

That may seem an unfairly direct characterization, but I hope you
can see how this, or any remotely similar request, is simply beyond
the scope of this particular newsgroup.

regards
andrew


------------------------------

Date: Mon, 5 Jul 1999 00:41:30 -0400
From: Steven Smolinski <sjs@yorku.ca>
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <931150139.455083470@newshub.ccs.yorku.ca>

On Sun, 04 Jul 1999, Alf Huckitt wrote:

>If my questions are too easy for the newsgroup. and the perl docs are
>too hard for me to understand. then apart from giving up which I
>refuse to do. then where do you suggest I go for help?

Try "Learning Perl" by Randall Schwartz, and "Perl Cookbook" by Tom
Christiansen and Nathan Torkington.

The former is great for a refresher on any basics you may have missed, with
very easy-to-understand tutorials.  The latter is several hundred pages of
practical code examples to solve specific everyday programming needs.

The Perl Cookbook has been _indispensible_ to me by showing by example how the
language was designed to be written.

Either of these books is easily within the grasp of any adult who is capable of
programming.  And, to be perfectly honest, if someone asks me questions when
he knows where to find the answers but just doesn't like reading, then screw
him.  

(I don't mean to imply that Mr Huckitt is doing this, but if anyone finds
the shoe comfortable, they can wear it with my compliments.)

Steve


------------------------------

Date: Mon, 5 Jul 1999 01:11:48 -0400
From: Steven Smolinski <sjs@yorku.ca>
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <931151880.1401240556@newshub.ccs.yorku.ca>

On Sun, 04 Jul 1999, Alf Huckitt wrote:

>I already pointed out in my first post that i was looking to learn and
>not to have it done for me. 

With all due respect, if you're looking to learn, you get books, do exercises,
take courses, practice, etc. etc.  If you're looking to learn from your own
mistakes, you print out your broken code, take it with you on the bus to work
and read it over again, you take more books out of the library, etc, etc.

If you're looking to have someone *do something for you* (as in troubleshoot a
problem, look it up in _Programming Perl_, or post some code) then you go to a
newsgroup.  You ask them to do it for you because (hopefully) you've tried
everything you know how to do (or have time for) and failed.  So if you're here,
you're asking somebody to do something for you.

And I think what seems to get people's panties in a bunch here is that people
sometimes fire off questions with almost no research done on their own.  If you
show that you've tried valiantly to learn on your own and read the F****
manuals, then I'm fairly sure you'll get a decent response.

Steve



------------------------------

Date: Sun, 4 Jul 1999 21:33:45 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <p12pl7.3e6.ln@magna.metronet.com>

Alf Huckitt (jam@jambutty7.freeserve.co.uk) wrote:

: unsubscribing. good bye :(


   Thank you.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Mon, 5 Jul 1999 21:20:14 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <1duhmdh.7ys862162nbxcN@p21.block2.tc2.state.ma.tiac.com>

John Nolan <nolanj00@mh.us.sbphrd.com> wrote:

>  4. The newbies will retaliate with a "social skills" bot. 
>     Miscreant Perl gurus will get a special email with
>     expert advice on basic social ineraction, free, 
>     automatically, each and every time they manifest 
>     their impatience, arrogance and lack of sensitivity.  

Ha.  You think the newbies can teach the gurus about netiquette, and
that the gurus manifest impatience, arrogance, and lack of sensitivity?
Newbies, by definition, are not qualified to give expert advice.

I'm sorry, you must have been reading some other newsgroup.

Maybe even in some other universe.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


------------------------------

Date: 05 Jul 1999 19:23:47 -0700
From: Brad Murray <bjm@a2b01118.paralynx.bconnected.net>
Subject: Re: Top 10 responses to the Robot/email idea
Message-Id: <87u2ri5xe4.fsf@a2b01118.paralynx.bconnected.net>

>>>>> "John" == John Nolan <nolanj00@mh.us.sbphrd.com> writes:

    John>  4. The newbies will retaliate with a "social skills" bot.

Which will not run correctly.

-- 
Brad Murray  "Anyway, you can tell that CreateProcess is simply wrong,
Perl Geek     not just because it's too complicated yet too limited, but
              because its name is long and ugly."   Tom Christiansen



------------------------------

Date: Sun, 4 Jul 1999 07:43:46 +0100
From: "Troy Knight" <troyknight@troyknight.eurobell.co.uk>
Subject: Translations
Message-Id: <7lmvmh$2jvp$1@slrn.eurobell.net>

I was just wondering if anyone could anser this question for me. I found
this snipppet of code in a perl book, it takes the value in $char,
translates it to the next letter or digit, then prints it out. I don't
understand why it does this. From what I have learnt it would translate any
lowercase letter from a-z to any lowercase letter from b-z. And it would
translate any uppercase letter from a-z to a, and so on.  Could someone
explain?

$char = "LETTER OR DIGIT HERE";
$char =~ tr/a-zA-Z0-9/b-zaB-ZA1-90/;
print $char;




------------------------------

Date: 4 Jul 1999 02:03:33 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Translations
Message-Id: <slrn7nu1pi.31h.abigail@alexandra.delanet.com>

Troy Knight (troyknight@troyknight.eurobell.co.uk) wrote on MMCXXXIII
September MCMXCIII in <URL:news:7lmvmh$2jvp$1@slrn.eurobell.net>:
## I was just wondering if anyone could anser this question for me. I found
## this snipppet of code in a perl book, it takes the value in $char,
## translates it to the next letter or digit, then prints it out. I don't
## understand why it does this. From what I have learnt it would translate any
## lowercase letter from a-z to any lowercase letter from b-z. And it would
## translate any uppercase letter from a-z to a, and so on.  Could someone
## explain?
## 
## $char = "LETTER OR DIGIT HERE";
## $char =~ tr/a-zA-Z0-9/b-zaB-ZA1-90/;
## print $char;


It works fine for me. You are confused however on how tr works. It
maps the characters one by one, and doesn't do any grouping. a-z (26
characters) is mapped to b-za (26 characters), A-Z (26 characters)
to B-ZA (26 characters) and 0-9 (10 characters) to 1-90 (10 characters).

How do you think translating a-z (26 characters) to b-z (25 characters)
is supposed to work anyway? And if 'a-z' were mapped to 'b-z', 'A-Z'
to 'a', and 0-9 to 'B-Z', why did you include the 'A', '1-9' and '0'
in the replacement part?


Abigail
-- 
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
                       -> define ("foldoc", "perl")) [0] -> print'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: Sun, 4 Jul 1999 10:58:42 +0100
From: "Troy Knight" <troyknight@troyknight.eurobell.co.uk>
Subject: Re: Translations
Message-Id: <7lnb41$2k9t$1@slrn.eurobell.net>

Abigail <abigail@delanet.com> wrote in message
news:slrn7nu1pi.31h.abigail@alexandra.delanet.com...
> Troy Knight (troyknight@troyknight.eurobell.co.uk) wrote on MMCXXXIII
> September MCMXCIII in <URL:news:7lmvmh$2jvp$1@slrn.eurobell.net>:
> ## I was just wondering if anyone could anser this question for me. I
found
> ## this snipppet of code in a perl book, it takes the value in $char,
> ## translates it to the next letter or digit, then prints it out. I don't
> ## understand why it does this. From what I have learnt it would translate
any
> ## lowercase letter from a-z to any lowercase letter from b-z. And it
would
> ## translate any uppercase letter from a-z to a, and so on.  Could someone
> ## explain?
> ##
> ## $char = "LETTER OR DIGIT HERE";
> ## $char =~ tr/a-zA-Z0-9/b-zaB-ZA1-90/;
> ## print $char;
>
>
> It works fine for me. You are confused however on how tr works. It
> maps the characters one by one, and doesn't do any grouping. a-z (26
> characters) is mapped to b-za (26 characters), A-Z (26 characters)
> to B-ZA (26 characters) and 0-9 (10 characters) to 1-90 (10 characters).
>

Ahh, I undersand now, I just couldn't understand how ranges worked in
translations but replacing the first 26 (a-z) with the next 26 (b-z and a)
makes sense. Thanks

> How do you think translating a-z (26 characters) to b-z (25 characters)
> is supposed to work anyway?
>And if 'a-z' were mapped to 'b-z', 'A-Z'
> to 'a', and 0-9 to 'B-Z', why did you include the 'A', '1-9' and '0'
> in the replacement part?
>
>
> Abigail
> --
> perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
>                        -> define ("foldoc", "perl")) [0] -> print'
>
>
>   -----------== Posted via Newsfeeds.Com, Uncensored Usenet News
==----------
>    http://www.newsfeeds.com       The Largest Usenet Servers in the World!
> ------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers
==-----




------------------------------

Date: Tue, 06 Jul 1999 14:13:19 GMT
From: biagio@my-deja.com
Subject: Unexpected behavior of Perl classes
Message-Id: <7lt2tl$f0r$1@nnrp1.deja.com>

hello guys,

I wrote the following simple perl package

########################## PACKAGE START ######
package Person;
require Exporter;

sub new {
	my $class = shift;
	my $self = {};
	my ($name, $age) = @_;
	$self{NAME} = $name;
	$self{AGE} = $age;
	bless $self;
	return $self;
}

sub name {
	my $self = shift;
	return $self{NAME};
}

sub age {
	my $self = shift;
	return $self{AGE};
}

1;
########################## PACKAGE END ######

this package is used by the program below:

###### MAIN START ######
require Person;
$me = new Person ("Biagio", 30);
$you = new Person ("John", 39);
print STDOUT $me->name () . " " . $me->age() . "\n";
print STDOUT $you->name () . " " . $you->age() . "\n";
###### MAIN END ######

the expected output was:
Biagio 30
John 39

but I got as result

John 39
John 39

Where did I fail? Where is the mistake?

thanks,
Biagio Scognamiglio


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: Tue, 06 Jul 1999 16:15:52 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Unexpected behavior of Perl classes
Message-Id: <37822B81.BDCB6C71@home.com>

[posted & mailed]

biagio@my-deja.com wrote:
> 
> sub new {
>         my $class = shift;
>         my $self = {};

$self is a reference to an anonymous hash.

>         my ($name, $age) = @_;
>         $self{NAME} = $name;
>         $self{AGE} = $age;

Here you are assigning to the hash %self.  It is not the same as the
anonymous hash above.

    $self->{NAME} = $name;
    $self->{AGE}  = $age;

If you had 'use strict' at the top of your program, it would have caught
this.

-- 
Rick Delaney
rick.delaney@home.com


------------------------------

Date: 6 Jul 1999 15:50:50 GMT
From: redmondm@yahoo.com ()
Subject: Re: Unexpected behavior of Perl classes
Message-Id: <slrn7o49rj.3m0.redmondm@kells.kells>

In article <7lt2tl$f0r$1@nnrp1.deja.com>, biagio@my-deja.com wrote:
>hello guys,
>
>I wrote the following simple perl package
>
>########################## PACKAGE START ######
>package Person;
>require Exporter;
>
>sub new {
>	my $class = shift;
>	my $self = {};
>	my ($name, $age) = @_;
>	$self{NAME} = $name;
>	$self{AGE} = $age;

$self is not a hash, it's a reference to a hash. So you need to access
it as such. The easiest way is using the arrow operator:

        $self->{'NAME'} = $name;  

>	bless $self;
>	return $self;
>}
>
>sub name {
>	my $self = shift;
>	return $self{NAME};
Same problem here. Should be 
        return $self->{'NAME'};

Martin



------------------------------

Date: Sat, 03 Jul 1999 18:06:32 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Unix CGI > Win/Mac
Message-Id: <pudge-0307991406370001@192.168.0.77>

In article <377475d9.343074955@news.deakin.edu.au>, tfischer@deakin.edu.au
(Thomas Fischer) wrote:

# >Well, you could output different stuff if you still want to. When you do
# >that, is the browser still doing the wrong thing?
# 
# YES. In an earlier document I use the JavaScript navigator.platform
# object to send a Platform identification to the PERL cgi. There I
# have a variable $PLATFORM which either contains the string
# "WIN", "MAC" or "UNX". Depending on that I want to filter the
# linefeed encoding.
# 
# You think this is right(?):
# 
# if ($PLATFORM eq "WIN") {$SOURCE =~ s/\n/\r\n/g;}
# if ($PLATFORM eq "MAC") {$SOURCE =~ s/\n/\r/g;}
# 
# I wonder why this doesn't work!??!?!?!

I have read the thread and am still unsure what you are trying to do.  If
you are outputting text to the browser, then you should use LFs or CRLFs
for newlines, even for a Mac OS browser.  I'd wager that Tom is right: it
probably *is* "working", but the browser and server are conspiring to foil
your efforts.

For clarity, you should use \015 and \012 for CR and LF, since the values
of \r and \n change from platform to platform (on MacPerl, \r\n is LFCR,
not CRLF).  See man perlport for more information.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


------------------------------

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V9 Issue 52
************************************


home help back first fref pref prev next nref lref last post