[29466] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 710 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 2 11:09:44 2007

Date: Thu, 2 Aug 2007 08:09:09 -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           Thu, 2 Aug 2007     Volume: 11 Number: 710

Today's topics:
    Re: @arts <bik.mido@tiscalinet.it>
    Re: FAQ 4.32 How do I strip blank space from the beginn <dalessio@motorola.NOSPAM.com>
    Re: FAQ 4.32 How do I strip blank space from the beginn <jmazon@invalid.invalid>
    Re: FAQ 4.32 How do I strip blank space from the beginn <bik.mido@tiscalinet.it>
    Re: How do you continue in a for loop? <quetzalcotl@consultant.com>
    Re: How do you continue in a for loop? <bik.mido@tiscalinet.it>
    Re: I am giving up perl because of assholes on clpm --  (Jamie)
    Re: if kill 9, $pid fails, is the error caught anywhere <bik.mido@tiscalinet.it>
    Re: Object creation failure in perl anno4000@radom.zrz.tu-berlin.de
    Re: Object creation failure in perl <mritty@gmail.com>
    Re: Object creation failure in perl  ramesh.thangamani@gmail.com
    Re: Object creation failure in perl <spamtrap@dot-app.org>
    Re: Object creation failure in perl <bugbear@trim_papermule.co.uk_trim>
    Re: Object creation failure in perl <mritty@gmail.com>
        OT: Quoting. Was Re: How do you continue in a for loop? <scobloke2@infotop.co.uk>
    Re: OT: Quoting. Was Re: How do you continue in a for l <abigail@abigail.be>
    Re: OT: Quoting. Was Re: How do you continue in a for l <bik.mido@tiscalinet.it>
    Re: OT: Quoting. Was Re: How do you continue in a for l <scobloke2@infotop.co.uk>
    Re: OT: Quoting. Was Re: How do you continue in a for l <scobloke2@infotop.co.uk>
    Re: Prototypes/Parameters to a Function/Sub-Routine <bik.mido@tiscalinet.it>
    Re: Prototypes/Parameters to a Function/Sub-Routine anno4000@radom.zrz.tu-berlin.de
    Re: Variable declaration - C vs script style <bugbear@trim_papermule.co.uk_trim>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 02 Aug 2007 11:23:43 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: @arts
Message-Id: <oj83b31s8l9bbrdirgc4ml61vfjsfcj2nh@4ax.com>

On Wed, 1 Aug 2007 18:46:17 -0500, Tad McClellan
<tadmc@seesig.invalid> wrote:

>> I suppose you can't injure anyone by means of a
>> usenet post. Well, except by suggesting as a solution to a given
>> problem, well to e.g. take that red cable, peel it off, take that
>> green cable, peel it off, 
>
>
>So far, so good...
>
>
>> and then join them together.
>
>
>... but that part was supposed to be:
>
>  and then touch them to your tongue.

It depends on the cables... It all depends on the cables...


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Wed, 1 Aug 2007 13:55:44 -0500
From: "Mario D'Alessio" <dalessio@motorola.NOSPAM.com>
Subject: Re: FAQ 4.32 How do I strip blank space from the beginning/end of a string?
Message-Id: <f8qlbv$jr2$1@newshost.mot.com>


"PerlFAQ Server" <brian@stonehenge.com> wrote in message 
news:64spn4-1kn.ln1@blue.stonehenge.com...
 ...
> 4.32: How do I strip blank space from the beginning/end of a string?
>
>    (contributed by brian d foy)
>
>    A substitution can do this for you. For a single line, you want to
>    replace all the leading or trailing whitespace with nothing. You can do
>    that with a pair of substitutions.
>
>            s/^\s+//;
>            s/\s+$//;

This is such a common task that I think it would be
worthwhile to have a dedicated, more efficient command
for it, similar to chomp/chop.

And what would be a good name for the command?

Mario 




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

Date: Thu, 02 Aug 2007 11:37:39 +0200
From: Jean-Baptiste Mazon <jmazon@invalid.invalid>
Subject: Re: FAQ 4.32 How do I strip blank space from the beginning/end of a string?
Message-Id: <fms8x8u5lb0.fsf@somewhere.net>

"Mario D'Alessio" <dalessio@motorola.NOSPAM.com> writes:

> "PerlFAQ Server" <brian@stonehenge.com> wrote in message 
> news:64spn4-1kn.ln1@blue.stonehenge.com...
>>            s/^\s+//;
>>            s/\s+$//;
>
> This is such a common task that I think it would be
> worthwhile to have a dedicated, more efficient command
> for it, similar to chomp/chop.
>
> And what would be a good name for the command?

"trim"

It's already in countless CPAN modules.  Seems to me it was so
worthwhile to have a dedicated command that many authors wrote
one themselves.


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

Date: Thu, 02 Aug 2007 12:49:52 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: FAQ 4.32 How do I strip blank space from the beginning/end of a string?
Message-Id: <sfd3b3lfnphuk3qa9vked52olhd108e02f@4ax.com>

On Wed, 1 Aug 2007 13:55:44 -0500, "Mario D'Alessio"
<dalessio@motorola.NOSPAM.com> wrote:

>>            s/^\s+//;
>>            s/\s+$//;
>
>This is such a common task that I think it would be
>worthwhile to have a dedicated, more efficient command
>for it, similar to chomp/chop.

I don't think so. That would be much in the php philosophy. Perl is
already a "large" language, but it still provides relatively simple
tools that linked together make for a synergic effect.

And as for efficiency... is the provided solution not fast enough? I
can't imagine many situations in which this would matter.

>And what would be a good name for the command?

stripwhitespace() ?


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 02 Aug 2007 04:07:09 -0700
From:  Ingo Menger <quetzalcotl@consultant.com>
Subject: Re: How do you continue in a for loop?
Message-Id: <1186052829.131758.44030@g4g2000hsf.googlegroups.com>

On 1 Aug., 00:21, use...@DavidFilmer.com wrote:

> And, of course, $i is a terrible variable name.

On the contrary.
It's short.
It's a clichee and as such conveys information about the intent of the
programmer. I for one use it *only* for integer valued indexes or loop
variables, and insofar $i is much better than everbodies whoore $_,
which can be anything anywhere.




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

Date: Thu, 02 Aug 2007 15:43:26 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How do you continue in a for loop?
Message-Id: <8on3b31j413aegstgprd8vupo48duk4uto@4ax.com>

On Thu, 02 Aug 2007 04:07:09 -0700, Ingo Menger
<quetzalcotl@consultant.com> wrote:

>> And, of course, $i is a terrible variable name.
>
>On the contrary.
>It's short.
>It's a clichee and as such conveys information about the intent of the
>programmer. I for one use it *only* for integer valued indexes or loop
>variables, and insofar $i is much better than everbodies whoore $_,
>which can be anything anywhere.

$_ is a pronoun. $i is a noun. Each is good for what it's good, don't
talk so bad 'bout $_ please. Anyway I agree with you: $i is perfectly
fine for integer indexes.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 02 Aug 2007 13:09:26 GMT
From: nospam@geniegate.com (Jamie)
Subject: Re: I am giving up perl because of assholes on clpm -- switching to Python
Message-Id: <Lc1186058698244350x8ae3b4c@earth.podro.com>

In <0Y2dnTFHdYnENTrbnZ2dnUVZ_vrinZ2d@giganews.com>,
Martha_Jones@tx.net mentions:
>Python is a better language, with php support, anyway, but I am fed up
>with attitudes of comp.lang.perl.misc. Assholes in this newsgroup ruin
>Perl experience for everyone. Instead of being helpful, snide remarks,
>back-biting, scare tactings, and so on proliferate and self
>reinforce. All honest people have left this sad newsgroup. Buy bye,
>assholes, I am not going to miss you!!!
>
>Martha

I've heard people tell the same story, that perl folks are... rude.

Actually, I've pretty much heard (and noticed) that about linux, too.

Yet, linux is still a good operating environment, so is perl.

You'll find rude people everywhere you look. While it may be true that
there is a higher percentage of hard-core tech folks who might lack
social skills, at least they don't err.. well, maybe they do.. byte. :-)

Seriously, it is one of the problems facing perl (and linux) people ARE
turned away by the attitude. It is rather embarassing/unflattering when
someone is critical of your work.

I see a lot of ideas about things should be "made easier" but I think 
thats the wrong course. We really just need to be nicer to new folks.

Jamie
-- 
http://www.geniegate.com                    Custom web programming
Perl * Java * UNIX                        User Management Solutions


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

Date: Thu, 02 Aug 2007 11:30:06 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: if kill 9, $pid fails, is the error caught anywhere?
Message-Id: <3v83b31atv5lerjonsh85cvpdefhnrasha@4ax.com>

On Wed, 01 Aug 2007 13:26:04 -0700, it_says_BALLS_on_your forehead
<simon.chao@fmr.com> wrote:

>> When directed at a process whose UID is not identical to that of the
>> sending process, signal number zero may fail because you lack permission
>> to send the signal, even though the process is alive. You may be able to
>> determine the cause of failure using "%!".
>
>did you really mean "%!"? or did you mean "$!"?

Since he also wrote

:     unless (kill 0 => $pid or $!{EPERM}) {
                                ^^^^^^^^^
                                ^^^^^^^^^
:         warn "$pid looks dead";
:     }

it's clear enough that he meant C<%!>.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 2 Aug 2007 07:37:11 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Object creation failure in perl
Message-Id: <5hdft7F3j7sldU1@mid.dfncis.de>

 <ramesh.thangamani@gmail.com> wrote in comp.lang.perl.misc:
> On Aug 1, 2:05 pm, anno4...@radom.zrz.tu-berlin.de wrote:
> >  <ramesh.thangam...@gmail.com> wrote in comp.lang.perl.misc:> I have
> written a code like this in my module:
> >
> >                  ^
> > "Code" in the sense of "computer instructions" is a mass noun and
> > doesn't take an indefinite article.
> >
> > > my $obj = MyModule->new() or die "Failed to create object of type
> > > MyModule $!" in my code.
> >
> > Presumably this code is part of the script that *uses* your module,
> > not part of the module itself.
> >
> > > Strangely enough sometimes the object
> > > creation is failing and I am not sure what could really be the issue.
> > > This script is running on Modperl and the platform is linux.
> > > Appreciate any help on this
> >
> > You need to give us a little more than that if you want help.  What
> > does your ->new do?  We can't debug code we don't see, show it.
> >
> > Anno
> 
> I am just creating an instance of MyModule that's it.

Yes, and for that you call MyModule->new and you haven't told us what
that method does.  How, do you expect, can anyone tell you why it
occasionally fails?  This is ridiculous.

Anno


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

Date: Thu, 02 Aug 2007 05:58:05 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: Object creation failure in perl
Message-Id: <1186059485.247020.200740@57g2000hsv.googlegroups.com>

On Aug 1, 4:48 am, ramesh.thangam...@gmail.com wrote:
> I have written a code like this in my module:
>
> my $obj = MyModule->new() or die "Failed to create object of type
> MyModule $!" in my code. Strangely enough sometimes the object
> creation is failing and I am not sure what could really be the issue.

The issue is pretty clearly that you did something wrong in your new()
method.  Since you haven't shown us your new() method, there is no
possible way anyone can tell you exactly what it is that you did
wrong.

Paul Lalli



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

Date: Thu, 02 Aug 2007 06:21:23 -0700
From:  ramesh.thangamani@gmail.com
Subject: Re: Object creation failure in perl
Message-Id: <1186060883.565279.42130@m37g2000prh.googlegroups.com>

On Aug 2, 5:58 pm, Paul Lalli <mri...@gmail.com> wrote:
> On Aug 1, 4:48 am, ramesh.thangam...@gmail.com wrote:
>
> > I have written a code like this in my module:
>
> > my $obj = MyModule->new() or die "Failed to create object of type
> > MyModule $!" in my code. Strangely enough sometimes the object
> > creation is failing and I am not sure what could really be the issue.
>
> The issue is pretty clearly that you did something wrong in your new()
> method.  Since you haven't shown us your new() method, there is no
> possible way anyone can tell you exactly what it is that you did
> wrong.
>
> Paul Lalli

The thing here is the code is not failing always. I am using a cron
wrapper script which creates an object of a module, then runs a
reports and emails it. The problem is it is failing only rarely like
for eg once in a month. The script runs daily.

I just wanted to know when we experience object creation failure.

1.  One thing is the system runs out of RAM, but it is very very
remote scenario.
2.  May be when the cron is running there is something which causing
the failure in middle ?
3.  Or something wrong in the code ?.

It is really a simple object creation code, which is failing only some
cases. There is nothing wrong in the code also since the same code
runs fine most of the cases.



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

Date: Thu, 02 Aug 2007 09:26:54 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Object creation failure in perl
Message-Id: <m2ejim5aox.fsf@dot-app.org>

ramesh.thangamani@gmail.com writes:

> On Aug 2, 5:58 pm, Paul Lalli <mri...@gmail.com> wrote:
>> On Aug 1, 4:48 am, ramesh.thangam...@gmail.com wrote:
>>
>> > I have written a code like this in my module:
>>
>> > my $obj = MyModule->new() or die "Failed to create object of type
>> > MyModule $!" in my code. Strangely enough sometimes the object
>> > creation is failing and I am not sure what could really be the issue.
>>
>> The issue is pretty clearly that you did something wrong in your new()
>> method.  Since you haven't shown us your new() method, there is no
>> possible way anyone can tell you exactly what it is that you did
>> wrong.
>>
>> Paul Lalli
>
> The thing here is the code is not failing always. I am using a cron
> wrapper script which creates an object of a module, then runs a
> reports and emails it. The problem is it is failing only rarely like
> for eg once in a month. The script runs daily.
>
> I just wanted to know when we experience object creation failure.

When there is an error in the object creation method - new() in this case.

> It is really a simple object creation code

Then why won't you post it?

> There is nothing wrong in the code also since the same code
> runs fine most of the cases.

If it only "runs fine" in most (not all) cases then there obviously *is*
something wrong with it.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Thu, 02 Aug 2007 14:46:25 +0100
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: Object creation failure in perl
Message-Id: <46b1e031$0$1608$ed2619ec@ptn-nntp-reader02.plus.net>

ramesh.thangamani@gmail.com wrote:
> 
> It is really a simple object creation code, which is failing only some
> cases. There is nothing wrong in the code also since the same code
> runs fine most of the cases. 

When you say "nothing wrong", I assume you mean "little wrong"

If there were NOTHING wrong, it would work in all cases.

   BugBear


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

Date: Thu, 02 Aug 2007 07:38:47 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: Object creation failure in perl
Message-Id: <1186065527.351057.79290@19g2000hsx.googlegroups.com>

On Aug 2, 9:21 am, ramesh.thangam...@gmail.com wrote:
> The thing here is the code is not failing always.

That is not an important "thing".  It is failing.  Therefore, you did
something wrong.

> I am using a cron wrapper script

Also irrelevant.

> which creates an object of a module, then runs a
> reports and emails it. The problem is it is failing only rarely like
> for eg once in a month. The script runs daily.

More irrelevance.

> I just wanted to know when we experience object creation failure.

"We" don't.  You are.  And you're experiencing it because YOU'VE DONE
SOMETHING WRONG.  We have no way of knowing WHAT that something is.

> 1.  One thing is the system runs out of RAM, but it is very very
> remote scenario.
> 2.  May be when the cron is running there is something which causing
> the failure in middle ?
> 3.  Or something wrong in the code ?.
>
> It is really a simple object creation code, which is failing only some
> cases. There is nothing wrong in the code also since the same code
> runs fine most of the cases.

BULL COCKY.  If there was nothing wrong with the code, it would always
work.

Let me explain to you what you've just done.  You've called your
mechanic and said "my car sometimes doesn't work."  The mechanic has
told you to bring it in to his shop so he can look at it, and you've
said "no, it only sometimes doesn't work".  The mechanic has asked you
what you mean by "doesn't work", and you've responded that you just
want him to give you a list of every possible thing that could be
wrong with the roads, traffic lights, stop signs, and Motor Vehicle
Department that would make your car not work sometimes, because you're
sure there's nothing at all wrong with your car.

You've used up your coupons.  Good luck to you.

Paul Lalli



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

Date: Thu, 02 Aug 2007 10:08:34 +0100
From: Ian Wilson <scobloke2@infotop.co.uk>
Subject: OT: Quoting. Was Re: How do you continue in a for loop?
Message-Id: <46b19f13$0$15213$fa0fcedb@news.zen.co.uk>

Michele Dondi wrote:
> This example is actually artificial and one doesn't need C<next> at
> all:

Where'd this C<...> quoting style come from? I've seen it in several 
postings. Does it do something useful in some newsreaders?


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

Date: 02 Aug 2007 09:15:32 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: OT: Quoting. Was Re: How do you continue in a for loop?
Message-Id: <slrnfb385b.1j2.abigail@alexandra.abigail.be>

                                              _
Ian Wilson (scobloke2@infotop.co.uk) wrote on VLXXXIV September MCMXCIII
in <URL:news:46b19f13$0$15213$fa0fcedb@news.zen.co.uk>:
-:  Michele Dondi wrote:
-: > This example is actually artificial and one doesn't need C<next> at
-: > all:
-:  
-:  Where'd this C<...> quoting style come from? I've seen it in several 
-:  postings. Does it do something useful in some newsreaders?


man perlpod



Abigail
-- 
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print 
               qq{Just Another Perl Hacker\n}}}}}}}}}'    |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w


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

Date: Thu, 02 Aug 2007 11:35:59 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: OT: Quoting. Was Re: How do you continue in a for loop?
Message-Id: <0593b3t0v2p845ignrsttf75dt75gqpnba@4ax.com>

On Thu, 02 Aug 2007 10:08:34 +0100, Ian Wilson
<scobloke2@infotop.co.uk> wrote:

>Michele Dondi wrote:
>> This example is actually artificial and one doesn't need C<next> at
>> all:
>
>Where'd this C<...> quoting style come from? I've seen it in several 
>postings. Does it do something useful in some newsreaders?

Not at all, it's POD format. Generally in a pure text context like
this one, if a "keyword" is visually distinctive enough then I see no
need to mark it in any special way. For example if I refer to $_ as
you can see I don't put anything around it; for functions, a pair of
parens to disambiguate are enough, e.g. map(); but with other stuff
that may confuse with normal text I go pseudo-POD e.g. with C<for>.
See

  perldoc perlpod


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 02 Aug 2007 11:12:31 +0100
From: Ian Wilson <scobloke2@infotop.co.uk>
Subject: Re: OT: Quoting. Was Re: How do you continue in a for loop?
Message-Id: <46b1ae10$0$31728$db0fefd9@news.zen.co.uk>

Abigail wrote:
>                                               _
> Ian Wilson (scobloke2@infotop.co.uk) wrote on VLXXXIV September MCMXCIII
> in <URL:news:46b19f13$0$15213$fa0fcedb@news.zen.co.uk>:
> -:  Michele Dondi wrote:
> -: > This example is actually artificial and one doesn't need C<next> at
> -: > all:
> -:  
> -:  Where'd this C<...> quoting style come from? I've seen it in several 
> -:  postings. Does it do something useful in some newsreaders?
> 
> 
> man perlpod
> 

Thanks,

=begin html
<p>I'm <strong>not</strong> in favour of using markup in newsgroups but 
I suppose I&apos;ll have to get used to the <em>clutter</em> ;-)</p>
=end html


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

Date: Thu, 02 Aug 2007 11:17:35 +0100
From: Ian Wilson <scobloke2@infotop.co.uk>
Subject: Re: OT: Quoting. Was Re: How do you continue in a for loop?
Message-Id: <46b1af40$0$31727$db0fefd9@news.zen.co.uk>

Michele Dondi wrote:
> On Thu, 02 Aug 2007 10:08:34 +0100, Ian Wilson
> <scobloke2@infotop.co.uk> wrote:
> 
>>Michele Dondi wrote:
>>
>>>This example is actually artificial and one doesn't need C<next> at
>>>all:
>>
>>Where'd this C<...> quoting style come from? I've seen it in several 
>>postings. Does it do something useful in some newsreaders?
> 
> 
> Not at all, it's POD format. Generally in a pure text context like
> this one, if a "keyword" is visually distinctive enough then I see no
> need to mark it in any special way. For example if I refer to $_ as
> you can see I don't put anything around it; for functions, a pair of
> parens to disambiguate are enough, e.g. map(); but with other stuff
> that may confuse with normal text I go pseudo-POD e.g. with C<for>.
> See
> 
>   perldoc perlpod
> 

Thanks, I think I'll stick with 'for', "next" or `perl`, but to each his 
own. :-)


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

Date: Thu, 02 Aug 2007 11:27:20 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Prototypes/Parameters to a Function/Sub-Routine
Message-Id: <4n83b31veusjt99d2aqi3kh6d1c4ntdruu@4ax.com>

On Wed, 01 Aug 2007 12:19:45 -0700, Paul Lalli <mritty@gmail.com>
wrote:

>> >But this program executes just fine.  Because an "empty" list is still
>> >a list.
>>
>> In fact this is perfectly fine, if you ask me, and not a good example
>> of prototypes failing.
>
>Perhaps not, but I think it is a decent example of prototypes not
>doing what someone new to Perl programming would *expect* them to do.

I'm thinking of it and I'm fairly sure that it's not the case, and in
particular that as a newbie I wouldn't have expected so. But then it's
probably because we tend to project our own way to see things on the
others too.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 2 Aug 2007 11:50:33 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Prototypes/Parameters to a Function/Sub-Routine
Message-Id: <5hduo9F3ieh4iU1@mid.dfncis.de>

O. Olson <olson_ord@yahoo.it> wrote in comp.lang.perl.misc:

[prototype question, has been answered]

> This would be of more importance when I am working with Objects i.e.
> to ensure that the reference passed, is an object of a certain class.

It is usually an indication of a design error if a method has to
care about the class an object comes from.  If an object *can* invoke
a method (through inheritance, for instance) the method should be able
to handle it.

Anno


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

Date: Thu, 02 Aug 2007 14:14:07 +0100
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: Variable declaration - C vs script style
Message-Id: <46b1d89f$0$1636$ed2619ec@ptn-nntp-reader02.plus.net>

brian d foy wrote:
> In article <1185883270.375241.4660@o61g2000hsh.googlegroups.com>,
> markoa <marko.anastasov@gmail.com> wrote:
> 
>> I've been wondering whether there are any differences in performance
>> when declaring variables within loops
>> comparing to all forward declarations. 
> 
> If that issue is a perfomance problem for you, then you're script is
> already really, really fast or Perl is the wrong tool for you
> (seriously). Don't even worry about it. 
> 
> You should, however, limit variables just to the scope where you
> actaully need them. :)
> 

And this is true for most languages.

    BugBear


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

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 710
**************************************


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