[23907] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6109 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 10 18:10:44 2004

Date: Tue, 10 Feb 2004 15:10:12 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 10 Feb 2004     Volume: 10 Number: 6109

Today's topics:
        Urgent: help needed : "Problem with double quotes" (Ramki)
    Re: Urgent: help needed : "Problem with double quotes" <usenet@morrow.me.uk>
    Re: Urgent: help needed : "Problem with double quotes" <tadmc@augustmail.com>
        using constants in a module (brad)
    Re: using constants in a module (Anno Siegel)
        Using HTTP::Daemon with CGI.pm <rjkaes@flarenet.com>
    Re: Why is Perl losing ground? (Sara)
    Re: Why is Perl losing ground? (Walter Roberson)
    Re: Why is Perl losing ground? <734562323@yahoo.de>
    Re: Why is Perl losing ground? <jwkenne@attglobal.net>
    Re: Why is Perl losing ground? <bmb@ginger.libs.uga.edu>
    Re: Why is Perl losing ground? <BLOCKSPAMfishfry@your-mailbox.com>
    Re: Why is Perl losing ground? <perl@my-header.org>
    Re: Why is Perl losing ground? <flavell@ph.gla.ac.uk>
    Re: Why is Perl losing ground? <usenet@morrow.me.uk>
    Re: Why is Perl losing ground? <syscjm@gwu.edu>
    Re: Why is Perl losing ground? <perl@my-header.org>
    Re: Why is Perl losing ground? <tassilo.parseval@rwth-aachen.de>
    Re: Why references?? <tore@aursand.no>
    Re: Why references?? (Carlton Brown)
    Re: Why references?? <xxala_qumsiehxx@xxyahooxx.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 10 Feb 2004 09:35:14 -0800
From: rkbk2000@yahoo.com (Ramki)
Subject: Urgent: help needed : "Problem with double quotes"
Message-Id: <1ec14e93.0402100935.33da7b98@posting.google.com>

Hi,
 I want to call a PERL program from MS-DOS batch file.
 Following is just an example, the string may inturn have double quote
or single quote.
 I can't call with arg1, arg2 etc, as the input will be dyanamic.

 My argument may be something like this "204.120.69.195" "-""-" 'xyz'
"GET"

Perl should receive the whole string as a single argument. I know it
is not a perl problem, From MS-DOS how can I

sent it so that perl program treats it as a single argument. 

Can you please tell me how I could send the whole thing as a single
argument to the PERL program.

If give the solution, I would be really grateful to you.

Thanks & regards,
Ramki


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

Date: Tue, 10 Feb 2004 17:49:55 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Urgent: help needed : "Problem with double quotes"
Message-Id: <c0b5k3$g12$2@wisteria.csv.warwick.ac.uk>


rkbk2000@yahoo.com (Ramki) wrote:
> Hi,
>  I want to call a PERL

Perl is not a nacronym.

> program from MS-DOS batch file.
>  Following is just an example, the string may inturn have double quote
> or single quote.
>  I can't call with arg1, arg2 etc, as the input will be dyanamic.

How are you producing this batch file? With another Perl script?

>  My argument may be something like this "204.120.69.195" "-""-" 'xyz'
> "GET"
> 
> Perl should receive the whole string as a single argument. I know it
> is not a perl problem, From MS-DOS how can I
> sent it so that perl program treats it as a single argument. 

perl program "\"204.120.69.195\" \"-\"\"-\" 'xyz' \"GET\""

I would suggest you write the info to a file somewhere, and pass that
to Perl to read. It's likely to be easier.

Ben

-- 
"The Earth is degenerating these days. Bribery and corruption abound.
Children no longer mind their parents, every man wants to write a book,
and it is evident that the end of the world is fast approaching."
     -Assyrian stone tablet, c.2800 BC                         ben@morrow.me.uk


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

Date: Tue, 10 Feb 2004 16:25:18 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Urgent: help needed : "Problem with double quotes"
Message-Id: <slrnc2imie.5jk.tadmc@magna.augustmail.com>

Ramki <rkbk2000@yahoo.com> wrote:

> I know it
> is not a perl problem,


Then you are in the wrong place.

We discuss Perl problems here in the Perl newsgroup.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 10 Feb 2004 11:06:28 -0800
From: spaughbradley@hotmail.com (brad)
Subject: using constants in a module
Message-Id: <9b99b7f2.0402101106.5c2c674a@posting.google.com>

I am creating various modules and in these modules, I would like to be
able to use constant XXX => X;
just like it was declared in the .pl file that uses that module.  How
is this possible.

declaring the constants in the module and using that module does not
work.
thanks


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

Date: 10 Feb 2004 19:11:34 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: using constants in a module
Message-Id: <c0bad6$mqb$1@mamenchi.zrz.TU-Berlin.DE>

brad <spaughbradley@hotmail.com> wrote in comp.lang.perl.misc:
> I am creating various modules and in these modules, I would like to be
> able to use constant XXX => X;
> just like it was declared in the .pl file that uses that module.  How
> is this possible.
> 
> declaring the constants in the module and using that module does not
> work.
> thanks

You probably want to export them.  See "perldoc Exporter".

Anno


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

Date: Tue, 10 Feb 2004 14:49:11 -0500
From: Robert James Kaes <rjkaes@flarenet.com>
Subject: Using HTTP::Daemon with CGI.pm
Message-Id: <pan.2004.02.10.19.49.10.670960@flarenet.com>

Hi,
Does anyone know of a way of passing a HTTP::Daemon::ClientConn into
CGI.pm so that CGI will read a POST request?  Basically, if I could copy
the HTTP::Daemon::ClientConn (which is a IO::Socket::INET, IO::Socket,
IO::Handle derived class) onto STDIN, CGI.pm should be able to read the
data right away.

Thanks for any help anyone can provide.
	-- Robert

-- 
    Robert James Kaes    ---  Flarenet Inc.  ---    (519) 426-3782
		 http://www.flarenet.com/consulting/
      * Putting the Service Back in Internet Service Provider *



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

Date: 10 Feb 2004 08:58:18 -0800
From: genericax@hotmail.com (Sara)
Subject: Re: Why is Perl losing ground?
Message-Id: <776e0325.0402100858.cf4a7a2@posting.google.com>

Dominic <roqetman@hotmail.com> wrote in message news:<23OVb.1$196.899@news.nyc.globix.net>...
> As a programmer who is addicted to Perl, I am curious as to why Perl is 
> losing ground to another bunch of languages, namely: Python, PHP and 
> Ruby. I'd like to hear your opinions. Is Perl just not "trendy" anymore? 
> Does it still scare programmers who haven't used it? Or do the other 
> languages have any major advantages over Perl? I haven't worked in these 
> other languages, so I'm not qualified to have much of an opinion here. 
> What do you think?
> 
>   - Dom

It HAD to happen sooner or later. Look at every programming language
ever . Each has an effective lifecycle. Who uses FORTRAN now? COBOL?
even c? Perl will look pretty much like COBOL in 20 years.

I haven't seen any convincing stats that Perl is declining "yet", but
it's only a matter of time if it isn't.  Unless it's some *miracle"
language.

WRT your specifics, I'd say offhand that PHP is in about the same
lifecycle point as Perl since they have similar audiences and
pedigrees. Python is climbing, as is Ruby although I see resistance to
Ruby in the USA since its percieved as an "offshore tool".  At least
that's a comment I hear when I propose it.

Incidentally, programmers, particularly those early in their careers,
this is exactly why you can't learn "a language or two" and expect
them to serve your needs for a whole career. You always have to be
looking at "what's next". Wise Perl programmers would be looking and
maybe even starting to use Python and Ruby now. I've been an industry
developer now for over 20 years, and if a language serves my
employer's needs for 5 years thats a long life!


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

Date: 10 Feb 2004 17:16:54 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: Why is Perl losing ground?
Message-Id: <c0b3m6$ph4$1@canopus.cc.umanitoba.ca>

In article <776e0325.0402100858.cf4a7a2@posting.google.com>,
Sara <genericax@hotmail.com> wrote:
:It HAD to happen sooner or later. Look at every programming language
:ever . Each has an effective lifecycle. Who uses FORTRAN now? COBOL?
:even c? Perl will look pretty much like COBOL in 20 years.

http://msnbc.msn.com/id/4147164/
MIT Technology Review
10 technologies that refuse to die  (Feb 4, 2004)

The last one on the list is Fortran.


:I've been an industry
:developer now for over 20 years, and if a language serves my
:employer's needs for 5 years thats a long life!

It must be nice to be able to rewrite all those programs every 5
years.
-- 
   I wrote a hack in microcode,
   with a goto on each line,
   it runs as fast as Superman,
   but not quite every time!                 -- Don Libes et al.


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

Date: Tue, 10 Feb 2004 14:04:39 -0500
From: L D Jones <734562323@yahoo.de>
Subject: Re: Why is Perl losing ground?
Message-Id: <40292B47.667F0E38@yahoo.de>

Sara wrote:
> 
> Dominic <roqetman@hotmail.com> wrote in message news:<23OVb.1$196.899@news.nyc.globix.net>...
> > As a programmer who is addicted to Perl, I am curious as to why Perl is
> > losing ground to another bunch of languages, namely: Python, PHP and
> > Ruby. I'd like to hear your opinions. Is Perl just not "trendy" anymore?
> > Does it still scare programmers who haven't used it? Or do the other
> > languages have any major advantages over Perl? I haven't worked in these
> > other languages, so I'm not qualified to have much of an opinion here.
> > What do you think?
> >
> >   - Dom
> 
> It HAD to happen sooner or later. Look at every programming language
> ever . Each has an effective lifecycle. Who uses FORTRAN now? COBOL?
> even c? Perl will look pretty much like COBOL in 20 years.

About 4 years ago I read an article (can't remember where) that said
most new systems are still done in COBOL today. My memory may be faulty
(which is certainly true) but COBOL is far from dead. Who uses C? Are
you kidding?

LD-Not a COBOL programmer


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

Date: Tue, 10 Feb 2004 19:07:47 GMT
From: "John W. Kennedy" <jwkenne@attglobal.net>
Subject: Re: Why is Perl losing ground?
Message-Id: <7_9Wb.4757$rv1.2988518@news4.srv.hcvlny.cv.net>

Sara wrote:
 > Who uses FORTRAN now?

Actually, FORTRAN still sees a lot of use in its specific problem domain.

-- 
John W. Kennedy
"But now is a new thing which is very old--
that the rich make themselves richer and not poorer,
which is the true Gospel, for the poor's sake."
   -- Charles Williams.  "Judgement at Chelmsford"


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

Date: Tue, 10 Feb 2004 14:07:17 -0500
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: Why is Perl losing ground?
Message-Id: <Pine.A41.4.58.0402101358240.27212@ginger.libs.uga.edu>

On Mon, 9 Feb 2004, Dominic wrote:

> As a programmer who is addicted to Perl, I am curious as to why Perl is
> losing ground to another bunch of languages, namely: Python, PHP and
> Ruby. I'd like to hear your opinions. Is Perl just not "trendy" anymore?
> Does it still scare programmers who haven't used it? Or do the other
> languages have any major advantages over Perl? I haven't worked in these
> other languages, so I'm not qualified to have much of an opinion here.
> What do you think?
>

Why do cats paint?

What bothers me about questions like this, and ensuing discussions (in
many cases), is the assumption that the original assumption is true.

Is Perl "losing ground"?  Are there reasonably good studies that show
this?  Can you cite them so we can look at them, too?

I'm not expressing a opinion one way or the other about Perl, just about
the merits of (sometimes implied) claims, if they're based solely on
anecdotal evidence.

My US$0.02,

Brad


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

Date: Tue, 10 Feb 2004 19:45:09 GMT
From: fishfry <BLOCKSPAMfishfry@your-mailbox.com>
Subject: Re: Why is Perl losing ground?
Message-Id: <BLOCKSPAMfishfry-108DD6.11451210022004@netnews.comcast.net>

In article <23OVb.1$196.899@news.nyc.globix.net>,
 Dominic <roqetman@hotmail.com> wrote:

> As a programmer who is addicted to Perl, I am curious as to why Perl is 
> losing ground to another bunch of languages, namely: Python, PHP and 
> Ruby. I'd like to hear your opinions. Is Perl just not "trendy" anymore? 
> Does it still scare programmers who haven't used it? Or do the other 
> languages have any major advantages over Perl? I haven't worked in these 
> other languages, so I'm not qualified to have much of an opinion here. 
> What do you think?
> 


Perl was originally a simple scripting and programming language. In the 
past several years these factors have contributed to its impending 
decline:

* Increasingly bizarre and arcane syntax features

* Refusal of developers to produce a language standard

* Emphasis on new features over consistency and stability

* Many original language features becoming deprecated, leading to code 
that stops running.


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

Date: Tue, 10 Feb 2004 20:45:07 +0100
From: Matija Papec <perl@my-header.org>
Subject: Re: Why is Perl losing ground?
Message-Id: <l9ai205rm821ubokftk1oue3mb16k6fi5h@4ax.com>

X-Ftn-To: Sara 

genericax@hotmail.com (Sara) wrote:
>> Does it still scare programmers who haven't used it? Or do the other 
>> languages have any major advantages over Perl? I haven't worked in these 
>> other languages, so I'm not qualified to have much of an opinion here. 
>> What do you think?
>
>It HAD to happen sooner or later. Look at every programming language
>ever . Each has an effective lifecycle. Who uses FORTRAN now? COBOL?
>even c? Perl will look pretty much like COBOL in 20 years.

Are you aware that C isn't replaceable when it comes to platform
portability? Can you name three operating systems which are relevant in
today use and are not written in C? I think one should take more input
factors when considering such generalizations.


-- 
Matija


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

Date: Tue, 10 Feb 2004 19:42:16 +0000
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: Why is Perl losing ground?
Message-Id: <Pine.LNX.4.53.0402101932130.8367@ppepc56.ph.gla.ac.uk>

On Tue, 10 Feb 2004, Sara wrote:

> It HAD to happen sooner or later.

Petitio principii.  I don't see any agreement that it's happened yet.

If it means that Perl4 is losing ground, then I'm all for it.  It's
taken far too long - and in the CGI field, where I happen to be
interested in Perl, it's incurred far too many risks, quite
unnecessarily, given the protections which are available in current
Perl if one has the sense to use them.

> Who uses FORTRAN now?

Just along the corridor from me!  But anyway, "Physicists write
FORTRAN in any language" - remark heard at CERN some years ago, but
there's a grain of truth in it yet.  It's not so long since I was
shown some Java code that looked like it had been roughly translated
from FORTRAN.

> COBOL?

I hear that COBOL programmers could command almost any fee, in the run
up to Y2K.  Not sure how that went since, though.

all the best (still nostalgic for BCPL, though.)


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

Date: Tue, 10 Feb 2004 20:24:21 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Why is Perl losing ground?
Message-Id: <c0bell$kg4$2@wisteria.csv.warwick.ac.uk>


Matija Papec <perl@my-header.org> wrote:
> Are you aware that C isn't replaceable when it comes to platform
> portability? Can you name three operating systems which are relevant in
> today use and are not written in C? I think one should take more input
> factors when considering such generalizations.

Most of the newer bits of Windows are written in C++.
Most of OSX is written in ObjC.
I don't know what OS/390 is written in, but I'd be surprised if it's
C.

Ben

-- 
   If you put all the prophets,   |   You'd have so much more reason
   Mystics and saints             |   Than ever was born
   In one room together,          |   Out of all of the conflicts of time.
ben@morrow.me.uk |----------------+---------------| The Levellers, 'Believers'


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

Date: Tue, 10 Feb 2004 16:43:37 -0500
From: Chris Mattern <syscjm@gwu.edu>
Subject: Re: Why is Perl losing ground?
Message-Id: <40295089.1010502@gwu.edu>

Ben Morrow wrote:
> Matija Papec <perl@my-header.org> wrote:
> 
>>Are you aware that C isn't replaceable when it comes to platform
>>portability? Can you name three operating systems which are relevant in
>>today use and are not written in C? I think one should take more input
>>factors when considering such generalizations.
> 
> 
> Most of the newer bits of Windows are written in C++.

But large parts of it are written in C.

> Most of OSX is written in ObjC.

OSX's window manager/GUI is written in ObjC, but the base operating
system is FreeBSD, and it's written in C.

> I don't know what OS/390 is written in, but I'd be surprised if it's
> C.
> 
I'm not sure myself, but OS/390's predecessors were written in
assembler, with extremely heavy use of layered macros.  OS/390
(aren't they calling it zOS now?  Or have the marketroids
already moved on to the next trendy name?  Call it what you
will, it's still MVS) is probably the same, at least in its
basic routines.  Whatever isn't assembler probably *is* in C,
though.  This isn't a case of C being superseded, this is a
case of the OS being older than C...

                Chris Mattern



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

Date: Tue, 10 Feb 2004 22:55:00 +0100
From: Matija Papec <perl@my-header.org>
Subject: Re: Why is Perl losing ground?
Message-Id: <p2ki20tto1fv6lbfihunmph0qtcm43sqfq@4ax.com>

X-Ftn-To: Ben Morrow 

Ben Morrow <usenet@morrow.me.uk> wrote:
>> Are you aware that C isn't replaceable when it comes to platform
>> portability? Can you name three operating systems which are relevant in
>> today use and are not written in C? I think one should take more input
>> factors when considering such generalizations.
>
>Most of the newer bits of Windows are written in C++.
>Most of OSX is written in ObjC.
>I don't know what OS/390 is written in, but I'd be surprised if it's
>C.

Strictly speaking C and C++ are not the same beasts but that is pretty
irrelevant in above context.


-- 
Matija


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

Date: 10 Feb 2004 22:09:29 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: Why is Perl losing ground?
Message-Id: <c0bkqp$d41$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Sara:

> Dominic <roqetman@hotmail.com> wrote in message news:<23OVb.1$196.899@news.nyc.globix.net>...
>> As a programmer who is addicted to Perl, I am curious as to why Perl is 
>> losing ground to another bunch of languages, namely: Python, PHP and 
>> Ruby. I'd like to hear your opinions. Is Perl just not "trendy" anymore? 
>> Does it still scare programmers who haven't used it? Or do the other 
>> languages have any major advantages over Perl? I haven't worked in these 
>> other languages, so I'm not qualified to have much of an opinion here. 
>> What do you think?
>> 
>>   - Dom
> 
> It HAD to happen sooner or later. Look at every programming language
> ever . Each has an effective lifecycle. Who uses FORTRAN now? COBOL?
> even c? Perl will look pretty much like COBOL in 20 years.
> 
> I haven't seen any convincing stats that Perl is declining "yet", but
> it's only a matter of time if it isn't.  Unless it's some *miracle"
> language.

Surely there must be some language that takes Perl's place then, no? 
I don't yet see which one that would be. Ruby is often mentioned but
when being honest, it isn't so very different from Perl. At least it's
not a radically different approach to programming which I would expect
the new future language to offer.

I rather predict that all the major languages nowadays - C++, Perl,
Ruby, Python, Java and maybe more - will still be around years from now.
As time flies by, these languages do not rest but also evolve. I suspect
that Perl6, once out, will be fresh enough to survive another ten years
with ease.

As for those allegedly dead languages you mentioned: FORTRAN is
certainly still widely used, and rightly so. With the increase in
computational power of computers though its market might shrink a
little. But I am sure people said that already fifteen years ago and
were proven wrong.

C is out of the question anyway. With its vast support for almost every
conceivable platform, it must be the most portable language of all. That
means people will continue using it for writing operating systems,
compilers and interpreters for other languages. Eventually it could
be replaced by C++, but this is not going to happen before it is more
widely supported.

The real change will happen when a completely new system of computers is
invented (think Quantum Computers as a placeholder for such a system).
But this would mean the death of not just Perl but any language as we
know them right now.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Tue, 10 Feb 2004 17:22:46 +0100
From: Tore Aursand <tore@aursand.no>
Subject: Re: Why references??
Message-Id: <pan.2004.02.10.15.57.51.272746@aursand.no>

On Tue, 10 Feb 2004 14:18:21 +0000, Ben Morrow wrote:
>>> But why would someone use a reference if they can use a normal
>>> variable?

>> I've read a lot of the other answers in this group, but none of them
>> seem to relate to why I prefer references: performance.
>> 
>> Copying the reference to a huge array is always faster than copying the
>> array itself.  It also uses less memory.

> But the semantics are different. If one is correct, the other is wrong.

That's correct.  But did we all (ie. me, at least) understand what the OP
really meant?

  "But why would someone use a reference if they can use a normal
   variable?"

Is that about semantics at all?  Maybe I misunderstand a bit, but the as I
see it, the main point of using references is the performance gain...?


-- 
Tore Aursand <tore@aursand.no>
"I didn't have time to write a short letter, so I wrote a long one
 instead." -- Mark Twain


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

Date: 10 Feb 2004 10:57:08 -0800
From: carltonbrown@hotmail.com (Carlton Brown)
Subject: Re: Why references??
Message-Id: <aa611a32.0402101057.417e0a49@posting.google.com>

Thomas Deschepper <thomas.deschepper.ecol@sintjozefscollege.be> wrote in message news:<c08d6u$89k$1@news.worldonline.be>...
> I've been reading Beginning Per & Programming Perl from O'Reilly for some time
> now and I'm getting used to references and how to grow them..
> 
> But why would someone use a reference if they can use a normal variable?

It's also a convenient way to shortcut to lower branches of complex
structures.  The convenience results from not having to explicitly
traverse the structure if you know you'll be working primarily in one
place for a while.  For example:

$kingdom{animalia}{chordata}{mammalia}{artiodactylae}{camelidae}{camelus}{bactrianus}{common_name}
= "Bactrian Camel";

If you want to repeatedly refer to the bactrian camel, there's no need
to keep typing in the entire structure.  Just create a reference to
the hash that holds the information for Bactrian camels:
$bactrianus_ref = \%{$kingdom{animalia}{chordata}{mammalia}{artiodactylae}{camelidae}{camelus}{bactrianus}};

Then you can quickly access the attributes of interest:
print "The common name of Bactrianus is",
$bactrian_ref->{common_name};

Or set attributes:
$batctrian_ref->{hump_count} = 2;

Yay.


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

Date: Tue, 10 Feb 2004 21:28:19 GMT
From: "Ala Qumsieh" <xxala_qumsiehxx@xxyahooxx.com>
Subject: Re: Why references??
Message-Id: <T1cWb.11284$223.3212@newssvr29.news.prodigy.com>

"Carlton Brown" <carltonbrown@hotmail.com> wrote in message
news:aa611a32.0402101057.417e0a49@posting.google.com...

> It's also a convenient way to shortcut to lower branches of complex
> structures.  The convenience results from not having to explicitly
> traverse the structure if you know you'll be working primarily in one
> place for a while.  For example:

Good point.

> $bactrianus_ref =
\%{$kingdom{animalia}{chordata}{mammalia}{artiodactylae}{camelidae}{camelus}
{bactrianus}};

Why are you de-referencing your reference, and then referencing it again?
You don't need to do that.

    $bactrianus_ref =
$kingdom{animalia}{chordata}{mammalia}{artiodactylae}{camelidae}{camelus}{ba
ctrianus};

> Then you can quickly access the attributes of interest:
> print "The common name of Bactrianus is",
> $bactrian_ref->{common_name};
>
> Or set attributes:
> $batctrian_ref->{hump_count} = 2;

Assuming you use the correct variable that stores your reference :-)

--Ala




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

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 V10 Issue 6109
***************************************


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