[27912] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9276 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 9 18:10:16 2006

Date: Fri, 9 Jun 2006 15:10: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           Fri, 9 Jun 2006     Volume: 10 Number: 9276

Today's topics:
        Merging potentially undefined hashes <dbasch@yahoo.com>
    Re: Merging potentially undefined hashes <mritty@gmail.com>
    Re: Merging potentially undefined hashes <nobull67@gmail.com>
    Re: Merging potentially undefined hashes <benmorrow@tiscali.co.uk>
    Re: Merging potentially undefined hashes <dbasch@yahoo.com>
    Re: Merging potentially undefined hashes <David.Squire@no.spam.from.here.au>
    Re: Merging potentially undefined hashes <dbasch@yahoo.com>
    Re: Merging potentially undefined hashes <dbasch@yahoo.com>
    Re: Merging potentially undefined hashes <dbasch@yahoo.com>
    Re: need help with prog. logic <tadmc@augustmail.com>
    Re: Regexp help. <wahab@chemie.uni-halle.de>
        regular expression again <peter@nowhere.com>
    Re: regular expression again <jl_post@hotmail.com>
        regular expressions <nospam@home.com>
        threads on XP-- system() works, backtic & popen dosen't <kdd21@hotmail.com>
    Re: urgent query <tadmc@augustmail.com>
    Re: What is Expressiveness in a Computer Language <7abc@sogetthis.com>
    Re: What is Expressiveness in a Computer Language <kkylheku@gmail.com>
    Re: What is Expressiveness in a Computer Language <kentilton@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 9 Jun 2006 11:07:38 -0700
From: "Derek Basch" <dbasch@yahoo.com>
Subject: Merging potentially undefined hashes
Message-Id: <1149876458.774743.295890@f6g2000cwb.googlegroups.com>

Hi everyone,

I have several functions (getBillingDatabaseAttributes, etc...) that
can either return a hash reference or undefined. They just return a DBI
selectrow_hashref function such as:

$hash_ref = $dbh->selectrow_hashref($statement);

How can I merge these hashes and undefined values?

If I do this:

%hash1 = (%$hash2, %$hash3);

I get a 'cant reference undefined value' error.

Here is my attempt at an idiom to handle this. Haven't tested it:

push(@user_attributes, $self->getBillingDatabaseAttributes($user_id));
push(@user_attributes, $self->getBoardsDatabaseAttributes($user_id));
push(@user_attributes, $self->getMembersDatabaseAttributes($user_id));

foreach (@user_attributes) {
  %user_attributes = (@_, %user_attributes);
}

 Am I on the right track?



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

Date: 9 Jun 2006 11:34:03 -0700
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Merging potentially undefined hashes
Message-Id: <1149878043.615242.288400@i40g2000cwc.googlegroups.com>

Derek Basch wrote:
> I have several functions (getBillingDatabaseAttributes, etc...) that
> can either return a hash reference or undefined. They just return a DBI
> selectrow_hashref function

Careful with your terminology.  They are not returning functions.  They
are returning the return value of another function.  Rather large
distinction.

> such as:
>
> $hash_ref = $dbh->selectrow_hashref($statement);
>
> How can I merge these hashes and undefined values?
>
> If I do this:
>
> %hash1 = (%$hash2, %$hash3);
>
> I get a 'cant reference undefined value' error.

How about:
%hash1 = map { defined $_ ? %{$_} : () } ($hash2, $hash3);

And here's a short-but-complete script that demonstrates its use:
perl -MData::Dumper -e'
$h2 = undef;
$h3 = { foo => q{bar}, baz => q{biff} };
$h4 = undef;
$h5 = { alpha => q{beta} };
%h1 = map { defined $_ ? %{$_} : () } ($h2, $h3, $h4, $h5);
print Dumper(\%h1);
'
$VAR1 = {
          'foo' => 'bar',
          'baz' => 'biff',
          'alpha' => 'beta'
        };

> Here is my attempt at an idiom to handle this. Haven't tested it:

Why would you post code that you've written but haven't tested?  What
was the stumbling block to actually testing it?  For all you know, your
code may work perfectly, and you're wasting the time of hundreds of
other people who are reading your question.

> push(@user_attributes, $self->getBillingDatabaseAttributes($user_id));
> push(@user_attributes, $self->getBoardsDatabaseAttributes($user_id));
> push(@user_attributes, $self->getMembersDatabaseAttributes($user_id));
>
> foreach (@user_attributes) {
>   %user_attributes = (@_, %user_attributes);
> }
>
>  Am I on the right track?

No.  And if you'd run the above code and let Perl tell you what's wrong
with it, you'd know why.  There are at least 3 things wrong with the
above code.  I leave you to figure out what they are.

Paul Lalli



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

Date: 9 Jun 2006 11:46:17 -0700
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: Merging potentially undefined hashes
Message-Id: <1149878776.208873.198260@g10g2000cwb.googlegroups.com>


Derek Basch wrote:
> Hi everyone,
>
> I have several functions (getBillingDatabaseAttributes, etc...) that
> can either return a hash reference or undefined. They just return a DBI
> selectrow_hashref function such as:
>
> $hash_ref = $dbh->selectrow_hashref($statement);
>
> How can I merge these hashes and undefined values?
>
> If I do this:
>
> %hash1 = (%$hash2, %$hash3);
>
> I get a 'cant reference undefined value' error.

My preferred idiom is:

%hash1 = (%{ $hash2 || {} }, %{ $hash3 || {} });

Or:

%hash1 = (%{\%$hash2}, %{\%$hash3});



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

Date: Fri, 9 Jun 2006 19:17:46 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: Merging potentially undefined hashes
Message-Id: <ajqol3-mh1.ln1@osiris.mauzo.dyndns.org>


Quoth "Derek Basch" <dbasch@yahoo.com>:
> Hi everyone,
> 
> I have several functions (getBillingDatabaseAttributes, etc...) that
> can either return a hash reference or undefined. They just return a DBI
> selectrow_hashref function such as:
> 
> $hash_ref = $dbh->selectrow_hashref($statement);
> 
> How can I merge these hashes and undefined values?
> 
> If I do this:
> 
> %hash1 = (%$hash2, %$hash3);
> 
> I get a 'cant reference undefined value' error.

Do you mean a 'Can't use and undefined value as a HASH reference' error?
Please be precise.

> Here is my attempt at an idiom to handle this. Haven't tested it:
> 
> push(@user_attributes, $self->getBillingDatabaseAttributes($user_id));
> push(@user_attributes, $self->getBoardsDatabaseAttributes($user_id));
> push(@user_attributes, $self->getMembersDatabaseAttributes($user_id));
> 
> foreach (@user_attributes) {
>   %user_attributes = (@_, %user_attributes);
> }
> 
>  Am I on the right track?

Well, I would just use

my %hash1 = map %$_, grep defined, $hash2, $hash3;

Ben

-- 
  Joy and Woe are woven fine,
  A Clothing for the Soul divine       William Blake
  Under every grief and pine          'Auguries of Innocence'
  Runs a joy with silken twine.                         benmorrow@tiscali.co.uk


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

Date: 9 Jun 2006 14:06:18 -0700
From: "Derek Basch" <dbasch@yahoo.com>
Subject: Re: Merging potentially undefined hashes
Message-Id: <1149887178.137937.268350@f6g2000cwb.googlegroups.com>

Ummmm... I was asking people for their ideas on what the proper idiom
to handle this problem was. The code I wrote was simply to convey a
concept because I knew that I was going about it the wrong way. Why
test code that you know is wrong? Especially, when it is  only
pseudocode and you clearly state that it is such.

I don't understand why some people on this list are so angry? I wrote
questions just like this on the python list for years and never once
got yelled at. I searched long and hard for previous answers to this
problem and found none. Only then did I post the question.

Anyways, thanks to everyone for the answers. I never would have thought
of these solutions on my own.

Paul Lalli wrote:
> > Here is my attempt at an idiom to handle this. Haven't tested it:
>
> Why would you post code that you've written but haven't tested?  What
> was the stumbling block to actually testing it?  For all you know, your
> code may work perfectly, and you're wasting the time of hundreds of
> other people who are reading your question.



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

Date: Fri, 09 Jun 2006 22:16:49 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: Merging potentially undefined hashes
Message-Id: <e6cog1$49l$1@news.ox.ac.uk>

Derek Basch wrote:
> Ummmm... I was asking people for their ideas on what the proper idiom
> to handle this problem was. The code I wrote was simply to convey a
> concept because I knew that I was going about it the wrong way. Why
> test code that you know is wrong? Especially, when it is  only
> pseudocode and you clearly state that it is such.
> 
> I don't understand why some people on this list are so angry? I wrote
> questions just like this on the python list for years and never once
> got yelled at. I searched long and hard for previous answers to this
> problem and found none. Only then did I post the question.

 ...and now you're top-posting. Grrrr.

> 
> Paul Lalli wrote:
>>> Here is my attempt at an idiom to handle this. Haven't tested it:
>> Why would you post code that you've written but haven't tested?  What
>> was the stumbling block to actually testing it?  For all you know, your
>> code may work perfectly, and you're wasting the time of hundreds of
>> other people who are reading your question.
> 


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

Date: 9 Jun 2006 14:34:17 -0700
From: "Derek Basch" <dbasch@yahoo.com>
Subject: Re: Merging potentially undefined hashes
Message-Id: <1149888857.355267.265050@i40g2000cwc.googlegroups.com>

Stupid google groups. I sometimes forget to fix the top posting because
it puts the cursor at the top and auto quote everything below. My
apologies.

David Squire wrote:
> Derek Basch wrote:
> > Ummmm... I was asking people for their ideas on what the proper idiom
> > to handle this problem was. The code I wrote was simply to convey a
> > concept because I knew that I was going about it the wrong way. Why
> > test code that you know is wrong? Especially, when it is  only
> > pseudocode and you clearly state that it is such.
> >
> > I don't understand why some people on this list are so angry? I wrote
> > questions just like this on the python list for years and never once
> > got yelled at. I searched long and hard for previous answers to this
> > problem and found none. Only then did I post the question.
>
> ...and now you're top-posting. Grrrr.
>
> >
> > Paul Lalli wrote:
> >>> Here is my attempt at an idiom to handle this. Haven't tested it:
> >> Why would you post code that you've written but haven't tested?  What
> >> was the stumbling block to actually testing it?  For all you know, your
> >> code may work perfectly, and you're wasting the time of hundreds of
> >> other people who are reading your question.
> >



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

Date: 9 Jun 2006 14:34:32 -0700
From: "Derek Basch" <dbasch@yahoo.com>
Subject: Re: Merging potentially undefined hashes
Message-Id: <1149888872.014351.295630@j55g2000cwa.googlegroups.com>

Stupid google groups. I sometimes forget to fix the top posting because
it puts the cursor at the top and auto quote everything below. My
apologies.



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

Date: 9 Jun 2006 14:44:04 -0700
From: "Derek Basch" <dbasch@yahoo.com>
Subject: Re: Merging potentially undefined hashes
Message-Id: <1149889444.728480.21330@j55g2000cwa.googlegroups.com>

Derek Basch wrote:
> Stupid google groups. I sometimes forget to fix the top posting because
> it puts the cursor at the top and auto quote everything below. My
> apologies.

Hahahhahahaahhahahha. Now i double posted and top posted. Great day for
Derek. Jeez.



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

Date: Fri, 2 Jun 2006 23:20:27 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: need help with prog. logic
Message-Id: <slrne823gb.uls.tadmc@magna.augustmail.com>

jlm33990 <jlm33990@gmail.com> wrote:
> Tad-
> Thanks for the help first of all.


Errr, you're welcome.

But what help are you talking about?

Please quote some context in followups like everybody else does.


> First I'm assuming when you say hash that is the same as an associative
> array - correct?


Yes, except that Perl programmers have not called them that for
about 10 years now.

Where did you learn the term from?


> Second I need some help understanding your logic - specifically the
> next unless statement. I'm having a hard time conceptualizing what you
> are comparing the regular expression to. 


Errr, I don't remember what the heck the "next unless" code was...


So, which is it that you are having trouble with?

Is it the next?

The description of next is in:

   perldoc -f next

Is it the unless?

The description of unless is in:

   perldoc perlsyn

Is it what string is being compared to the pattern?

The description of the m/PATTERN/ operator is in:

   perldoc perlop

It says rather clearly what string is searched when you
don't use the binding operator (=~).


> I don't see you saving the
> info from prior records. 


I count them (in the hash) as I encounter them.


> I also don't understand the actual regular
> expression. If I understand \d, . and + properly it seems you are
> searching for the literal IP followed by a space followed by a digit
> and any character except newline(\d.) any number of times(+) followed
> by a dot. 


I don't remember what I was doing.

I post lots of code for folks, I don't remember what I posted for you.

I haven't had news access lately, so it has been several days since 
I wrote whatever it was I wrote.


> Again I also don't see what you are comparing it to. Obviously I'm
> missing something.


$_


> If you could enlighten this humble programmer I would be most
> appreciative. Thanks


You have not made it easy enough for me to respond helpfully.

I'm not going to take the time to go search my archives to find
out what you are talking about.

If you want to discuss code, then quote the code that you are 
discussing, and I would be happy to help.


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


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

Date: Sat, 03 Jun 2006 00:44:39 +0200
From: Mirco Wahab <wahab@chemie.uni-halle.de>
Subject: Re: Regexp help.
Message-Id: <e5qf8a$sb5$1@mlucom4.urz.uni-halle.de>

Thus spoke Dr.Ruud (on 2006-06-02 16:44):

> { local ($", $\, $/) = ("\n", "\n", undef) ;
>   print "@{[ <> =~ /(\b(?:http:|www\.)\S+)/g ]}"
> }

Ok ok ok.

(I added this to my '~/perl/snippets' dir ;-)

Thanks

Mirco


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

Date: Fri, 09 Jun 2006 20:47:45 GMT
From: "Peter Janssens" <peter@nowhere.com>
Subject: regular expression again
Message-Id: <R7lig.473672$lU4.12368927@phobos.telenet-ops.be>

Hi,

Original question.
I want to retrieve all occurences of a string "aa". So in the search string
"aaaa", I have to find it three times (aa)aa, a(aa)a, aa(aa).

How can I do that, using regular expressions in Perl?

The following solution (previous post) works fine but ...
/(a(?=(a)))/g

Suppose I want to search for aaa or aab in the string aaabaabaa.

I thaught the following will do the job: a(?=a)[ab].
But is doesn't.

Also, if you try something like aa[ab] it will find the first instance (aaa) 
but
not the second (aab) in  aaabaabaa.

Your help is appreciated.

Peter




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

Date: 9 Jun 2006 14:53:29 -0700
From: "jl_post@hotmail.com" <jl_post@hotmail.com>
Subject: Re: regular expression again
Message-Id: <1149890009.676943.115590@c74g2000cwc.googlegroups.com>

Peter Janssens wrote:
>
> Original question.
> I want to retrieve all occurences of a string "aa". So in the search string
> "aaaa", I have to find it three times (aa)aa, a(aa)a, aa(aa).
>
> The following solution (previous post) works fine but ...
> /(a(?=(a)))/g

   If you say it works fine, I'll take your word for it... but when I
try this:

       print "$1 " while "aaaa" =~ m/(a(?=(a)))/g

I get the following output:

      a a a

I see it's capturing three strings (like you wanted), but it's only the
first letter of those strings (which may or may not be what you
wanted).  You seem to be content with that, so I'll just assume for the
time being that that's okay with you.

> Suppose I want to search for aaa or aab in the string aaabaabaa.
>
> I thaught the following will do the job: a(?=a)[ab].
> But is doesn't.

   This isn't working because the "(?=a)" is a positive look-ahead
(look it up in "perldoc perlre" if you don't know what that is) that is
telling the regular expression that the next character MUST be "a".
But then the "[ab]" tells it that the next character can either be an
"a" or "b".

   So the only way to satisfy both conditions is if the character after
the first "a" is also an "a".  I think you meant to write this instead:

      a(?=a[ab])

This will find an "a" followed by either "aa" or "ab".

   You can see this if you run the following code:

      print "$-[0] " while "aaabaabaa" =~ m/(a(?=a[ab]))/g

The output is:

      0 1 4

meaning that matches in string "aaabaabaa" were found at indices 0, 1,
and 4.  (The "$-[0]" is part of the "@-" array.  If you don't know what
it does, you can look it up in "perldoc perlvar".)

   I hope this helps, Peter.

   -- Jean-Luc



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

Date: Sat, 03 Jun 2006 04:28:20 GMT
From: "Nospam" <nospam@home.com>
Subject: regular expressions
Message-Id: <Ed8gg.3217$qD.1898@newsfe1-gui.ntli.net>

Is there a regular expression for moving onto the next series of characters
all the way to the end starting from a particular character (i.e that start
character is not included) in the regular expression. ?





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

Date: 9 Jun 2006 11:48:32 -0700
From: "kdd21@hotmail.com" <kdd21@hotmail.com>
Subject: threads on XP-- system() works, backtic & popen dosen't...
Message-Id: <1149878912.323383.277830@u72g2000cwu.googlegroups.com>

Am running ActiveState perl v5.8.7 on Windows XP Pro.    Tried the
following test script.  The  idea here is to run two parallel threads
that process a common queue of todo items.   The processing however,
requires running some external executables.  Had first tried the
backtic as I'd like to get the output.  Was hanging so I tried some
other combinations.

Finally arrived at the following test script.  I can run it on Debian
Linux (using the appropriate $XTCMD definition uncommented) and all
three flavors work fine, and pretty much identically.

On windows however, only $EXEMODE = 0 works.  The others both hang on
the external.

I'd really like to avoid the temporary file technique, and use EITHER
the backtic or the popen version (or something else that would work if
I'm not aware of it)...

Any idea what's happening here?  Windows pseudo-fork anomalies perhaps?
 Any other alternatives?


#!/usr/bin/perl -w
use strict;
use threads;
use threads::shared;

my $EXEMODE = 0;	# 0: system 1: bactic  2: popen   Try all three to
compare

#my $XTCMD = "/usr/bin/sort testfile";			# linux test
my $XTCMD = "c:\\windows\\system32\\sort.exe testfile";	# windows test

my $queueindex : shared;
share $queueindex;

my $thearg = 0;
my $qsize = 10;
$queueindex = 0;

sub inc_qindex
{
#	print "Locking index\n";
	lock $queueindex;
	$queueindex++;
#	print "Returning index $queueindex\n";
	return $queueindex;
}

sub dothread
{
	my ($v,$m,@m);
	my $taskctr = 0;
	my $tmpfile = "tmp" . $thearg . ".out";
	while (1)
	{
		$v = &inc_qindex;		# get next queue item

		last if ($v > $qsize);		# end of queue

		print "I am thread [" . $thearg . "] index = [" . $v . "]\n";

		if ($EXEMODE eq 0) 	# this works OK
		{
				system("$XTCMD >$tmpfile");
				open XT,"$tmpfile" or die "$!: Can't open $tmpfile!";
				@m = (<XT>);
				close XT;
				$m = join("",@m);
				print $m;		# will see this
		}

		if ($EXEMODE eq 1)	# this hangs
		{
			$m = `$XTCMD`;
			print $m;		# never see this
		}

		if ($EXEMODE eq 2)	# this also hangs
		{
			open XT,"$XTCMD|" or die "$!: trying to run $XTCMD!";
			@m = (<XT>);
			close XT;
			$m = join("",@m);
			print $m;	# never see this
		}
		$taskctr++;
	}
	return $taskctr;
}

sub test_threaded
{
	my ($ta,$tb,$r);
	$thearg = 1;
	$ta = threads->new("dothread");

	$thearg = 2;
	$tb = threads->new("dothread");

	$r = $ta->join;

	print "Thread 1 returned [$r]\n";

	$r = $tb->join;

	print "Thread 2 returned [$r]\n";

}

#dothread;	# test it unthreaded to make sure it works

test_threaded;



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


Sync



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

Date: Fri, 9 Jun 2006 13:25:20 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: urgent query
Message-Id: <slrne8jf8g.66r.tadmc@magna.augustmail.com>

anuruchi@yahoo.com <anuruchi@yahoo.com> wrote:
> if I want to add (merge) two excel file using perl script, how can i do
> that.
> like
> excel 1
>======
> name|city|number|
> aa      a   123
> dd      d  111
> excel 2
>======
> name|city|number|
> an      la   1l23
> dn      ld  11l1
> 
> merge excel =
> -==========
> name|city|number|
> aa      a   123
> dd      d  111
> an      la   1l23
> dn      ld  11l1


   cp excel1 merge_excel; tail +2 excel2 >>merge_excel


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


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

Date: 9 Jun 2006 11:28:46 -0700
From: "PofN" <7abc@sogetthis.com>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <1149877726.498412.294850@y43g2000cwc.googlegroups.com>

Xah Lee wrote:
[the usual toff-topic trolling stuff]

Shit, da troll is back. Abuse reports need to go to
abuse [] pacbell.net and abuse [] swbell.net this time.



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

Date: 9 Jun 2006 11:32:18 -0700
From: "Kaz Kylheku" <kkylheku@gmail.com>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <1149877938.754797.119750@g10g2000cwb.googlegroups.com>

Xah Lee wrote:
> Has anyone read this paper? And, would anyone be interested in giving a
> summary?

Not you, of course. Too busy preparing the next diatribe against UNIX,
Perl, etc. ;)



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

Date: Fri, 09 Jun 2006 17:27:35 -0400
From: Ken Tilton <kentilton@gmail.com>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <bJlig.1852$E9.1201@fe11.lga>



Joe Marshall wrote:
> Xah Lee wrote:
> 
>>in March, i posted a essay "What is Expressiveness in a Computer
>>Language", archived at:
>>http://xahlee.org/perl-python/what_is_expresiveness.html
>>
>>I was informed then that there is a academic paper written on this
>>subject.
>>
>>On the Expressive Power of Programming Languages, by Matthias
>>Felleisen, 1990.
>>http://www.ccs.neu.edu/home/cobbe/pl-seminar-jr/notes/2003-sep-26/expressive-slides.pdf
>>
>>Has anyone read this paper? And, would anyone be interested in giving a
>>summary?
> 
> 
> The gist of the paper is this:  Some computer languages seem to be
> `more expressive' than
> others.  But anything that can be computed in one Turing complete
> language can be computed in any other Turing complete language.
> Clearly the notion of
> expressiveness isn't concerned with ultimately computing the answer.
> 
> Felleisen's paper puts forth a formal definition of expressiveness in
> terms of semantic
> equivilances of small, local constructs.  In his definition, wholescale
> program transformation is
> disallowed so you cannot appeal to Turing completeness to claim program
> equivalence.
> 
> Expressiveness isn't necessarily a good thing.  For instance, in C, you
> can express the
> addresses of variables by using pointers.  You cannot express the same
> thing in Java, and
> most people consider this to be a good idea.
> 

Thanks for the summary.

Me, I would like to see a definition of expressiveness that would 
exclude a programming mechanism from "things to be expressed".

If the subject is programmer productivity, well, I write programs to get 
some behavior out of them, such as operating an ATM cash dispenser. If I 
need to keep a list of transactions, I need to express the abstraction 
"list" in some data structure or other, but below that level of 
abstraction I am just hacking code, not expressing myself -- well, that 
is the distinction for which I am arguing.

heck, in this case I will even give you as "thing to express" getting 
back multiple values from a function. That comes up all the time, and it 
can be an aggravation or a breeze. But then I would score C down because 
it does not really return multiple values. One still has some heavy 
lifting to do to fake the expressed thing. But I would still give it an 
edge over java because Java's fakery would have to be a composite object 
-- one could not have a primary return value as the function result and 
ancillary values "somewhere else".

kt

-- 
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."
    -- Smiling husband to scowling wife, New Yorker cartoon


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

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


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