develooper Front page | perl.beginners | Postings from March 2002

Re: AW: [PBML] constant scalar

From:
Jonathan E. Paton
Date:
March 18, 2002 08:41
Subject:
Re: AW: [PBML] constant scalar
Message ID:
20020318164111.73859.qmail@web14607.mail.yahoo.com
> only just for you ... (next time for the public)

This time for the public, just watch what you say
privately as well as publicly.  Plenty of people
have been offended this way to slightly disappear
from their regular IRC/Mailing list haunts.

> 1. Data References and Anonymous Storage
> 
> You can create references to constant scalars
> in a similar fashion:
> $ra     = \10;
> $rs     = \"hello world";
>
> OK ! If a have a reference than I'm able to
> dereference a constant scalar.

Okay, I'm wrong.  However, just read:

perldoc constant

"In the current implementation, scalar constants
are actually inlinable subroutines. As of version
5.004 of Perl, the appropriate scalar constant is
inserted directly in place of some subroutine calls,
thereby saving the over-head of a subroutine call. See
"Constant Functions" in perlsub for details about
how and when this happens."

and a few other dire warnings about constants to
note that they DO HAVE serious limitation that can
cause strange effects.  I assumed that taking a
reference to a constant could take the reference to
the subroutine, which by trial wasn't wasn't true.

> The plain vanilla solution you give is perhaps
> a perl beginners solution but is not the answer
> of my question.

PLAIN VANILLA is the default and preferred flavour
for beginners.  I mean, why do little code snippets
when I could code their entire application for them.

Or, alternatively, I could write a OO or Perl golf
solution.

> Don't bore us with your ignorance.

Added your email address to my block list, ignorance
is curable, but your rudeness is not.  I don't mind
being told I'm wrong, but I like to be told nicely
- that's how we all learn.

I assume you consider yourself perfect, and above my
abilities and skills and also my flaws.  You don't
deserve my attention, and it's up to other mailing
list members to decide if you are worth their time.

My suggestion is that you hire a consultant who can
tell you 100% correct answers for infinately more
money than I am being paid.

I'll never post again on request from the list, if
they really feel I'm too ignorant/stupid to answer
questions.  However, I'm not stupid enough to let
one individual stop me.

Jonathan Paton <-- In a bad mood now

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About