[31866] in Perl-Users-Digest
Perl-Users Digest, Issue: 3129 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 12 11:09:26 2010
Date: Sun, 12 Sep 2010 08:09:05 -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 Sun, 12 Sep 2010 Volume: 11 Number: 3129
Today's topics:
Re: How to pass hash as sub parameter? <jurgenex@hotmail.com>
Re: How to pass hash as sub parameter? <tadmc@seesig.invalid>
Re: How to pass hash as sub parameter? <tadmc@seesig.invalid>
Re: How to pass hash as sub parameter? <tadmc@seesig.invalid>
Re: How to pass hash as sub parameter? <rui.maciel@gmail.com>
Re: How to pass hash as sub parameter? <rui.maciel@gmail.com>
Re: How to pass hash as sub parameter? <rui.maciel@gmail.com>
Re: How to pass hash as sub parameter? <rui.maciel@gmail.com>
Re: How to pass hash as sub parameter? <rui.maciel@gmail.com>
Re: How to pass hash as sub parameter? <jurgenex@hotmail.com>
Re: How to pass hash as sub parameter? <rui.maciel@gmail.com>
Re: How to pass hash as sub parameter? <rui.maciel@gmail.com>
Re: How to pass hash as sub parameter? <uri@StemSystems.com>
Re: How to pass hash as sub parameter? <rui.maciel@gmail.com>
Re: How to pass hash as sub parameter? <sherm.pendley@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 11 Sep 2010 18:15:37 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <p19o86d3nce0g32prjuipo9nbanog23h59@4ax.com>
Rui Maciel <rui.maciel@gmail.com> wrote:
>Tad McClellan wrote:
>
>> Can it be that you have not read even as far as the 2nd paragraph
>> of the description of Perl's subroutines?
>
>If you happen to take the time to google "perl sub tutorial"
Why would anybody do that?
>you will learn that the first hit from
>perl.org does not rank very high.
So? Neither does oreilly.com nor pick-your-favourite-domin for that
matter None of those domains have much to do with the documentation of
Perl subroutines.
If you are really searching Google for an online tutorial for Perl then
I honestly feel sorry for you: as has been discussed in this NG many
times the vast majority of those tutorials simply stink.
If you are familiar with programming then just use the standard Perl
documentation that comes with any Perl installation. Yes, it even has
tutorials for many non-trivial areas like references, regular
expressions, etc, etc.. If the standard documentation is missing, then
someone tried to save a few MBs of storage in a very wrong place.
And if you need to start at a lower level and begin with the basics then
I strongly suggest one of the beginner's books that are recommended in
the FAQ, see "perldoc -q books".
jue
------------------------------
Date: Sat, 11 Sep 2010 20:43:47 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <slrni8oc2g.kpj.tadmc@tadbox.sbcglobal.net>
Rui Maciel <rui.maciel@gmail.com> wrote:
> Tad McClellan wrote:
>
>> Can it be that you have not read even as far as the 2nd paragraph
>> of the description of Perl's subroutines?
>
> If you happen to take the time to google "perl sub tutorial"
I don't _need_ to take the time ...
> you will learn
... because I have already learned about Perl subs from the
documentation of Perl's subs.
It is _you_ who needs to learn about Perl's subroutines.
You do that by reading the standard documentation for Perl's
subroutines, not following links from a web search.
> that the first hit from
> perl.org does not rank very high.
What does that tell you?
It tells me that googling is a less-than-reliable method of finding
Perl documentation.
The reliable method is to use the documentation that is installed
as part of a normal Perl installation.
No google, or even 'net connectivity is required to access the
Best Possible Perl Resource.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
------------------------------
Date: Sat, 11 Sep 2010 20:47:42 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <slrni8oc9r.kpj.tadmc@tadbox.sbcglobal.net>
Rui Maciel <rui.maciel@gmail.com> wrote:
> J�rgen Exner wrote:
>
>> If you know of a way how to word this even more explicit then please let
>> us know.
>
> Do you believe you are doing anyone any favours by posting condescending messages?
>
Do you believe that you are doing anone any favors by
expecting us to read the documentation to you?
Perl is a poor programming language for you.
I suggest you go learn Python instead.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
------------------------------
Date: Sat, 11 Sep 2010 20:49:37 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <slrni8ocde.kpj.tadmc@tadbox.sbcglobal.net>
Rui Maciel <rui.maciel@gmail.com> wrote:
> Tad McClellan wrote:
>
>> Can it be that you have not read even as far as the 2nd paragraph
>> of the description of Perl's subroutines?
>
> If you happen to take the time to google
You appear to be resistant to learning how to conduct yourself
on Usenet.
Off to perpetual invisibility with you.
plonk!
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
------------------------------
Date: Sun, 12 Sep 2010 11:55:01 +0100
From: Rui Maciel <rui.maciel@gmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <4c8cb18c$0$24464$a729d347@news.telepac.pt>
Tad McClellan wrote:
>> If you happen to take the time to google "perl sub tutorial"
>
>
> I don't _need_ to take the time ...
...and still you believe you are in any position to post condescending messages. What does this say
about you?
Rui Maciel
------------------------------
Date: Sun, 12 Sep 2010 12:36:08 +0100
From: Rui Maciel <rui.maciel@gmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <4c8cbb2a$0$24464$a729d347@news.telepac.pt>
J�rgen Exner wrote:
> Rui Maciel <rui.maciel@gmail.com> wrote:
>>Tad McClellan wrote:
>>
>>> Can it be that you have not read even as far as the 2nd paragraph
>>> of the description of Perl's subroutines?
>>
>>If you happen to take the time to google "perl sub tutorial"
>
> Why would anybody do that?
If someone happens to decide to invest his time learning Perl and, after reading some tutorials,
that person decides to learn a bit more on Perl's subs then the first thing that that person will
do is open his search engine of choice and search for a Perl sub tutorial. When someone does that
through Google, the first hit from Perl.org only pops up in the 2nd or 3rd search page, with a
dozen or so tutorials on this particular subject ranking higher than that.
Moreover, Perl.com's beginner's introduction to Perl says practically nothing about passing
arguments to subs. The only thing that it is said about this subject is:
<quote>
In the same way that Perl's built-in functions can take parameters and can return values, your
subs can, too. Whenever you call a sub, any parameters you pass to it are placed in the special
array @_.
</quote>
That says nothing about the idiosyncrasies of Perl's sub arguments and it mentions nowhere the
"parameters are passed as one single flat list of scalars" tidbit. As a consequence, if a Perl
already has a programming background then he will be left with the impression that the arguments
are passed through the special array but they do retain their type. So, for example, if someone
passed a couple of arrays to a sub then @_ would be an array of arrays, with $_[0] pointing to the
first array and $_[1] pointing to the second one.
>>you will learn that the first hit from
>>perl.org does not rank very high.
>
> So? Neither does oreilly.com nor pick-your-favourite-domin for that
> matter None of those domains have much to do with the documentation of
> Perl subroutines.
>
> If you are really searching Google for an online tutorial for Perl then
> I honestly feel sorry for you: as has been discussed in this NG many
> times the vast majority of those tutorials simply stink.
Yes, they do.
> If you are familiar with programming then just use the standard Perl
> documentation that comes with any Perl installation. Yes, it even has
> tutorials for many non-trivial areas like references, regular
> expressions, etc, etc.. If the standard documentation is missing, then
> someone tried to save a few MBs of storage in a very wrong place.
Ok, I'll start looking into it.
Thanks for the help,
Rui Maciel
------------------------------
Date: Sun, 12 Sep 2010 12:48:10 +0100
From: Rui Maciel <rui.maciel@gmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <4c8cbdfb$0$24472$a729d347@news.telepac.pt>
Uri Guttman wrote:
> and if you use google to learn programming, you must be very high!
I believe people use search engines to find and filter information. If someone stumbles on perl.org
while searching for tutorials do you actually believe it would make perl.org something which can
only be used if that person is "very high" ? Obviously not.
> perl has a very solid set of docs that come with it. you don't need
> google to find them.
No one needs google to find them, just like no one needs a newsgroup to learn more about it. Yet,
here you are. Why is that?
> try reading them and learn about perl's subs before
> you go off on rants like this.
If you don't like seeing people responding to misanthropic users who waste their time flaming
newbies then you will do far better if you complain about those idiots who do their best to drive
people away from this newsgroup.
Rui Maciel
------------------------------
Date: Sun, 12 Sep 2010 12:49:15 +0100
From: Rui Maciel <rui.maciel@gmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <4c8cbe3c$0$24472$a729d347@news.telepac.pt>
Tad McClellan wrote:
> Do you believe that you are doing anone any favors by
> expecting us to read the documentation to you?
No one forces you to read anything. So, if you don't have anything productive to add then I suggest
you waste your time elsewhere.
Rui Maciel
------------------------------
Date: Sun, 12 Sep 2010 13:00:58 +0100
From: Rui Maciel <rui.maciel@gmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <4c8cc0fa$0$24472$a729d347@news.telepac.pt>
Uri Guttman wrote:
> you have not been gracious at all in asking for help nor in how you
> reply to answers.
You must be confused or you haven't even bothered to follow this thread. Either way, I suggest that
you read this thread. If you happen to do so, you will notice that there were plenty of helpful
posts by helpful users who succeeded in correcting my misconception and steering me in the right
direction, and they succeeded in that by posting helpful, polite messages.
> me thinks you are not going to do well in the
> programming world with an attitude like that.
If you believe that the problem relies in every newbie that may post any question on basic concepts
instead in the misanthropic idiots who waste their time flaming newly-comers then it appears you are
confusing your priorities.
Rui Maciel
------------------------------
Date: Sun, 12 Sep 2010 05:12:37 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <spfp86devjrpqjqko44082996ve9ek3roa@4ax.com>
Rui Maciel <rui.maciel@gmail.com> wrote:
>J?rgen Exner wrote:
>> Rui Maciel <rui.maciel@gmail.com> wrote:
>>>If you happen to take the time to google "perl sub tutorial"
>>
>> Why would anybody do that?
>
>If someone happens to decide to invest his time learning Perl and, after reading some tutorials,
>that person decides to learn a bit more on Perl's subs then the first thing that that person will
>do is open his search engine of choice and search for a Perl sub tutorial.
Well, although they very much wish to be Google is not the answer to all
questions. And when it comes to Perl documentation they are very much
not the answer.
>Moreover, Perl.com's beginner's introduction to Perl says practically nothing about passing
>arguments to subs. The only thing that it is said about this subject is:
>
><quote>
>In the same way that Perl's built-in functions can take parameters and can return values, your
>subs can, too. Whenever you call a sub, any parameters you pass to it are placed in the special
>array @_.
></quote>
>That says nothing about the idiosyncrasies of Perl's sub arguments and it mentions nowhere the
>"parameters are passed as one single flat list of scalars" tidbit.
As has been said before, there is no need to consult any web site for
Perl information.
However you do have a valid point here. I checked 'perldoc perlintro'
and while it does mention subs briefly it omits the parameter handling
characteristics completely, too.
While I realize that for the author of an introduction it is difficult
to draw the line at the right place between too much and too little
detail in this case a bit less verbiage and a bit more detail may have
been better. Just one sentence "Arguments are passed as a single flat
list and the elements in @_ are aliased to the arguments, for details
see perldoc perlsub." would go a long way to avoid common
misunderstandings.
jue
------------------------------
Date: Sun, 12 Sep 2010 13:38:55 +0100
From: Rui Maciel <rui.maciel@gmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <4c8cc9e0$0$24468$a729d347@news.telepac.pt>
J�rgen Exner wrote:
> However you do have a valid point here. I checked 'perldoc perlintro'
> and while it does mention subs briefly it omits the parameter handling
> characteristics completely, too.
> While I realize that for the author of an introduction it is difficult
> to draw the line at the right place between too much and too little
> detail in this case a bit less verbiage and a bit more detail may have
> been better. Just one sentence "Arguments are passed as a single flat
> list and the elements in @_ are aliased to the arguments, for details
> see perldoc perlsub." would go a long way to avoid common
> misunderstandings.
Sounds reasonable. In fact, omitting the "single flat list" reference from an introduction to Perl
does sound like a reasonable option if we consider that newbies, at least when taking their very
first Perl steps, won't go beyond passing scalar types to their subs. This only starts to become an
issue once newbies start to pass non-scalar variables to a sub.
Rui Maciel
------------------------------
Date: Sun, 12 Sep 2010 14:18:03 +0100
From: Rui Maciel <rui.maciel@gmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <4c8cd30c$0$24472$a729d347@news.telepac.pt>
Tad McClellan wrote:
> You appear to be resistant to learning how to conduct yourself
> on Usenet.
That's odd, as I've been a usenet user for over a decade now. Isn't it strange that I had to wait
all this time to get a useless misanthropic idiot to complain about being talked back to?
> Off to perpetual invisibility with you.
As you've failed to contribute anything remotely meaningful and productive, I have this nagging
feeling no one will miss your contributions.
Rui Maciel
------------------------------
Date: Sun, 12 Sep 2010 10:27:15 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <874odv9gvw.fsf@quad.sysarch.com>
>>>>> "RM" == Rui Maciel <rui.maciel@gmail.com> writes:
RM> Uri Guttman wrote:
>> and if you use google to learn programming, you must be very high!
RM> I believe people use search engines to find and filter
RM> information. If someone stumbles on perl.org while searching for
RM> tutorials do you actually believe it would make perl.org something
RM> which can only be used if that person is "very high" ? Obviously
RM> not.
learning a language is not a general search thing. the perl community
doesn't put effort into google ranking. it is up to the learner to know
there are docs with perl, good books and to go to perl.org. simple things.
>> perl has a very solid set of docs that come with it. you don't need
>> google to find them.
RM> No one needs google to find them, just like no one needs a
RM> newsgroup to learn more about it. Yet, here you are. Why is
RM> that?
to add to the docs. you haven't even read them it seems. the basics of
subs are all there yet you seem to know little about them.
>> try reading them and learn about perl's subs before
>> you go off on rants like this.
RM> If you don't like seeing people responding to misanthropic users
RM> who waste their time flaming newbies then you will do far better
RM> if you complain about those idiots who do their best to drive
RM> people away from this newsgroup.
no, we like people who ask good questions. you haven't yet. you ranted
as much as you asked. that isn't nice. sorry, you lose.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Sun, 12 Sep 2010 15:54:17 +0100
From: Rui Maciel <rui.maciel@gmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <4c8ce99c$0$24477$a729d347@news.telepac.pt>
Uri Guttman wrote:
> learning a language is not a general search thing.
You fail to understand the difference between "learning a language" and searching for information
regarding a very specific subject. That's the fundamental role of search engines and the reason
why search engines are the most sought-for services on the web.
> >> perl has a very solid set of docs that come with it. you don't need
> >> google to find them.
>
> RM> No one needs google to find them, just like no one needs a
> RM> newsgroup to learn more about it. Yet, here you are. Why is
> RM> that?
>
> to add to the docs. you haven't even read them it seems. the basics of
> subs are all there yet you seem to know little about them.
Oddly enough, the very first document I read on perl was perl.com's beginner's introduction to
Perl, which fails to mention such a fundamental aspect of Perl. So, if you happen to lurk this
newsgroup to maintain that sort of info in perl.com then I have to say you have a lot of room to
improve your contributions.
> no, we like people who ask good questions. you haven't yet. you ranted
> as much as you asked. that isn't nice. sorry, you lose.
It's odd that you try to speak for others, as I've got plenty of helpful, constructive
contributions from friendly users, which outnumbered the misanthropic trolls which tried to piss
on this thread. So, as you are unable to post in a civilized manner then I suggest that you limit
your participation on this newsgroup to digging for information to paste on the docs. You don't
do anyone any good, let alone the Perl community, if you waste your time trolling newbies with
condescending posts.
Rui Maciel
------------------------------
Date: Sun, 12 Sep 2010 11:07:28 -0400
From: Sherm Pendley <sherm.pendley@gmail.com>
Subject: Re: How to pass hash as sub parameter?
Message-Id: <m2hbhv3sr3.fsf@sherm.shermpendley.com>
Rui Maciel <rui.maciel@gmail.com> writes:
> Tad McClellan wrote:
>
>> You appear to be resistant to learning how to conduct yourself
>> on Usenet.
>
> That's odd, as I've been a usenet user for over a decade now.
And yet, in all that time you *still* haven't learned the correct line
width at which to wrap your posts? You *still* haven't learned to
lurk a while first and read a group's FAQ & guidelines before posting
to it?
Not the brightest bulb in the box, are ya?
sherm--
--
Sherm Pendley
<http://camelbones.sourceforge.net>
Cocoa Developer
------------------------------
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:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#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 3129
***************************************