[6652] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 277 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 11 08:07:36 1997

Date: Fri, 11 Apr 97 05:00:36 -0700
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, 11 Apr 1997     Volume: 8 Number: 277

Today's topics:
     a foreach quetion <ahenig@tx.technion.ac.il>
     Debugging with PERLDB -> Emacs??? <andreat@dsnet.it>
     Re: exit: and foreach (A. Deckers)
     FRAUD <mstich@erols.com>
     Re: Is the Penguin dead? (Ollivier Robert)
     Re: Kudos to Tom Christiansen and problems with OO <lpa@sysdeco.no>
     Re: libnet-1.0502 (I R A Aggie)
     More than one value for each key  in a DB (was: DBM pro <harald.joerg@mch.sni.de>
     OOP & perl <ahenig@tx.technion.ac.il>
     Re: Ousterhout and Tcl lost the plot with latest paper (Ioi Lam)
     Re: Ousterhout and Tcl lost the plot with latest paper <graham.hughes@resnet.ucsb.edu>
     Re: Ousterhout and Tcl lost the plot with latest paper <graham.hughes@resnet.ucsb.edu>
     Re: Perl-Books. (I R A Aggie)
     pm2html <santiago@gambito.com>
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and <are@laphroig.mch.sni.de>
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and (Dan Haskell)
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and (Rainer Joswig)
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and (Robert Virding)
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and lvirden@cas.org
     Re: why can't arg 1 to shift be split? <tom@eiscat.uit.no>
     Win32::ODBC  : need help! Filhol@esigelec.fr
     Re: Would like to test cgi-scripts offline. gordon.leslie.mcdorman@sap-ag.de
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 10 Apr 1997 09:08:50 +0300
From: Allon Henig <ahenig@tx.technion.ac.il>
Subject: a foreach quetion
Message-Id: <334C83F2.7AD7@tx.technion.ac.il>

Hi,
	I wonder if you have an answer to a very simple yet suprisengly 
itching problem: 

Many times I've been using the following statments:

	$array_index = 0;
	foreach (@array) { 
		... do something with $_ ;
		... do something with $array_index ; 
		$array_index++ ;
	}

Is there a perl var that saves the use of the $array_index ???
A premade perl var that gives the index of the $_ var ???

	Thanks	,
			Allon


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

Date: Fri, 11 Apr 1997 09:02:50 +0100
From: Andrea Tomasini <andreat@dsnet.it>
Subject: Debugging with PERLDB -> Emacs???
Message-Id: <334DF02A.CE13E553@dsnet.it>

Hi People of this wonderful newsgroup, 
I am trying to debug some CGI under EMACS, with the module "perldb", I
wonder to know how to set up Environment Variable (like set environment
in GDB), and how to pass Command Line Parameter to the Script, and/or
redirect standard Input/Output to my own files...

I mean, from the command line prompt it's enough:

perl -d myscript < myfile

But in the debugging Environment??? From the DB prompt I mean??
Is it also possible that GUS have something to manage this? ;-)

Thanks 

Andrea
-- 
_________________
DS Logics Bologna
_________________


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

Date: 11 Apr 1997 10:11:56 GMT
From: Alain.Deckers@man.ac.uk (A. Deckers)
Subject: Re: exit: and foreach
Message-Id: <slrn5ks3jd.eka.Alain.Deckers@nessie.mcc.ac.uk>

In <01bc45e4$67671480$1991e9cd@garcia.huron.net>,
	Stephen Hill <scs@huron.net> wrote:
>I want to be able to exit a foreach loop if a condition is met. I can only
>get it to exit the whole script :-(

for $i (1..10) {
	# only want 9, actually.
	last if ($i == 9);
	# do something for 1..9
}

Try searching for 'last' in the perlfunc man page: 
`man perlfunc | grep last` should get you what you want.

Cheers,
-- 
Alain.Deckers@man.ac.uk          <URL:http://www.man.ac.uk/%7Embzalgd/>
Perl information: <URL:http://www.perl.com/perl/>
        Perl FAQ: <URL:http://www.perl.com/perl/faq/>
   Perl software: <URL:http://www.perl.com/CPAN/>
>>>>>>>>>>>>> NB: comp.lang.perl.misc is NOT a CGI group <<<<<<<<<<<<<<


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

Date: Fri, 11 Apr 1997 04:25:37 -0400
From: Matthew Stich <mstich@erols.com>
Subject: FRAUD
Message-Id: <334DF581.2C02@erols.com>


Report Internet Fraud to:
(Save in your bookmark folder)


http://www.fraud.org/repoform.htm

http://www.fraud.org/

THANK YOU FOR YOUR CONCERN


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

Date: 11 Apr 1997 08:54:16 GMT
From: roberto@eurocontrol.fr (Ollivier Robert)
Subject: Re: Is the Penguin dead?
Message-Id: <5iku7o$i9b$2@polaris.eurocontrol.fr>

    [courtesy cc of this posting sent to cited author via email]

In article <5i77nn$rjb@aubrey.stanford.edu>,
James A. Robinson <jim.robinson@stanford.edu> wrote:
> Anyone know if the Penguin is dead? 

Here is what Felix said in perl5-porters:
------------------------------------------------------------
Since people seem to be asking about it:

1.  Penguin3 is really going to be released sometime in the
near future.  Really.  No kidding this time.  I'm not even joking.
It's going to happen.  Honest.  And even though I've said this
before, this time I mean it.

2.  If anyone here either knows of or is a mathematician
that intersects the set of { capable of understanding elliptic curve
math, wants to earn a few bucks, wants to increase the public
good }, I would appreciate knowing about it.  I'm interested in
putting together an unpatented, free replacement for PGP, for
Penguin's use and also for the common weal.

Felix
------------------------------------------------------------

So, no, it is not dead.
-- 
Ollivier ROBERT   -=- Eurocontrol EEC/TS -=-   Ollivier.Robert@eurocontrol.fr
Usenet Canal Historique                        FreeBSD: there are no limits !


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

Date: Fri, 11 Apr 1997 10:48:20 +0200
From: Luca Passani <lpa@sysdeco.no>
Subject: Re: Kudos to Tom Christiansen and problems with OO
Message-Id: <334DFAD4.2C47@sysdeco.no>

I get this error:

 DB<1> $a= EntityBlock->new
Can't call method "new" in empty package "EntityBlock" at (eval 4) line
2, <IN> 
chunk 1.

The package in question is empty, in fact, but has the correct
declarations for inheritance from a non empty super-class (which
implements the "new" method):

package EntityBlock;
use Block;
use strict;

use vars qw(@ISA);
@ISA = qw(Block);

 Even though I can overcome the problem by defining a bogus method, I
wonder if perl should not try to solve inheritance before giving up.
 After all, it often happens that empty classes are needed in the
beginning as placeholders, even though the methods are added 
afterwards.
 Might this be an implication of "use strict"?

Luca

-- 
======================================================================
Luca Passani.          | Sysdeco Innovation AS, http://www.sysdeco.no
Email: lpa@sysdeco.no  | Trondheimsveien 184, 0570 Oslo, Norway
Tel: (+47) 22 09 66 06 | Fax: (+47) 22 09 65 03
======================================================================


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

Date: Wed, 09 Apr 1997 16:44:54 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: libnet-1.0502
Message-Id: <fl_aggie-ya02408000R0904971644540001@news.fsu.edu>

In article <Pine.SOL.3.95.970408103317.3127A-100000@colibri.hq.rnp.br>,
Antonio Paulo Salgado Forster <forster@hq.rnp.br> wrote:

+ Should I install Perl again?

Only if you want to. If you want to take the easy way out, you may just
want to install the IO::* modules... :)

James

-- 
Consulting Minster for Consultants, DNRC

To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: Fri, 11 Apr 1997 12:04:28 +0000
From: Harald Joerg <harald.joerg@mch.sni.de>
To: Daniel Sundin <daniel.sundin@engelholm.se>
Subject: More than one value for each key  in a DB (was: DBM problem)
Message-Id: <334E28CC.64E@mch.sni.de>

Daniel Sundin wrote:
> 
> [...]
> The problem is, I want to save more than one value to each key.
> I figured this could be done like:
> 
> $DB{$foo} = { "Name" => "Daniel", "Address" => "BOX 1221");
> 
> but it doesnt seem to work, [...]

Some possible solutions:
1) Create one DB per value:
     $NAMEDB{$foo}  =  $name;
     $ADDRDB{$foo}  =  $address;

2) Concatenate your values with a separator: Store with
     $DB{$foo}  =  $name . $separator . $address;
   and retreive with
     ($name,$address)  =  ($DB{$foo} =~ /(.*?)$separator(.*)/);
   ($separator must not be allowed in $name)

3) Append your hash keys to the DB key
     $DB{$foo . 'name'}     =  $name;
     $DB{$foo . 'address'}  =  $address;

Your choice...
-- 
Cheers,
--haj--


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

Date: Thu, 10 Apr 1997 08:12:12 +0300
From: Allon Henig <ahenig@tx.technion.ac.il>
Subject: OOP & perl
Message-Id: <334C76AC.19CE@tx.technion.ac.il>

Hi,
	I'm looking for the best Internet source to study OOP in perl.
	Do you have any idea ?

		thanks,	Allon


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

Date: 11 Apr 1997 08:03:36 GMT
From: ioi@hercules.cs.cornell.edu (Ioi Lam)
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <5ikr8o$db3@blather.cs.cornell.edu>

Christopher Hylands (SeeMySignature@for.my.email.address) wrote:
: In article <E83MAz.IA1@undergrad.math.uwaterloo.ca> papresco@csclub.uwaterloo.ca (Paul Prescod) writes:

:    Sun is pushing Java more than ever. The reason for their interest
:    in TCL seems to be this dichtomy between systems programming
:    languages and scripting languages.

: Seems to me that the combination of Java and Tcl is _very_ powerful.
: My point is that you have your lunch and eat the other guy's too :-)      
:    
: It seem like most Java GUIs are ugly as sin (misaligned entry boxes of
: different lengths etc.).  Tk GUIs are easy to tune because you can
: keep evaluating a proc until it looks right.  With Java, you usually
: have to recompile and restart.  (SpecJava might help here, I don't know)

Getting bored by the constant flamming? How about a little Jacl -- a
Tcl interpreter written in Java. Jacl is a perfect marriage between
Java and Tcl. When it's finished, it will have the ability to script
any arbitrary Java object using Tcl. See

     http://www.cs.cornell.edu/home/ioi/Jacl

Jacl's admittedly lame motto is "Doodle once, script anywhere".

Comments? Feature requests? Please send mail to

     ioi@cs.cornell.edu

-- Ioi Lam


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

Date: 11 Apr 1997 00:46:09 -0700
From: "Graham C. Hughes" <graham.hughes@resnet.ucsb.edu>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <87encim27e.fsf@A-abe.resnet.ucsb.edu>

-----BEGIN PGP SIGNED MESSAGE-----

>>>>> "Donal" == Donal K Fellows <nospam.fellowsd@cs.man.ac.uk> writes:

Donal> What exactly do you mean by "subclassing"?  How can you be sure
Donal> that you need a C extension to do it with Tcl/Tk?  I have made
Donal> Tcl/Tk-only labelled frames, comboboxes and progress meters
Donal> quite easily, so it is entirely possible that you are simply
Donal> mistaken in your assertion.

Let me put it this way: you can define new Tcl functions so

my_button .foo -text "Bar" -command "puts foo"

works.  However, you have to do an incredible amount of work to get
this to work, because you have to define a function `.foo' with
half-a-hundred cases for everything you *might* want to do.  Also, you
run into name collisions; suppose .foo is some sort of wrapper about
 .foo__WHEE_IM_A_MANGLED_NAME.  How do you differentiate names?  How do
you allow

my_frame .foo ...
my_button .foo.bar ...

to work?

Compare this to

foo = My_Frame(root, ...);
bar = My_Button(foo, ...);

in Python.

>> - lists where accessing anything is an O(n) operation

Donal> What version are you talking about?  This (a long-standing
Donal> complaint of many Tcl entheusiasts) is no longer true in Tcl8.

Never used Tcl8, don't plan to.  The best thing about Tcl8 is that Tk
is finally moving away from its Tcl foundation, so I get all the
benefits of Tk in a real language.  Also, which implementation did
Ousterhout choose to support?  lindex and lappend have quite different
penalties, which is why STL supports vector<> and list<>.

Does Tcl8 do 8-bit strings yet?

>> - numbers that autoconvert when you don't want them to (on east
>> coast area codes, for example)

Donal> I believe this (another moan of great age) is fixed too.

Again, don't know about this.

However, these two changes alone implies some really major reworking
of the compiler, like adding a type system.  Does this mean that Tcl
is then shedding the `everything is a string' attribute that
Ousterhout considered so wonderful?

>> - non-extensible mathematical expressions (think expr here)

Donal> Fair enough, though I'd add that putting in your own stuff
Donal> (which does admittedly have a different syntax) is still not
Donal> hard.

True.  However, it is very different syntax.

Case in point:  I was considering Tcl for a built-in language for a
system I was going to rewrite.  I rejected it when I discovered that
 - Tcl doesn't have a rand() function in expr.
 - I couldn't put one in.
 - The alternative syntax would've been hairy.

I was trying to rewrite a MUD derivative, BTW, and a good random
number generator was essential; it would be used certainly much more
than 

>> - call by name - dynamic scoping

Donal> These two are construable as a feature (though I would like the
Donal> other kind of semantics AS WELL... :^)

I can't really consider them that.  It causes real confusion, although
it's better than the situation in LISP 1.5...

>> and other assorted nastiness.  Even Perl is a breath of fresh air
>> compared to this.

Donal> For some things.

I'm talking about syntax, here.  Remember

while {1} {		# <- error! # is a _function_
}

Unless Ousterhout has changed Tcl so much that it isn't just a
glorified macro processor, the cost/benefit equation hasn't changed.
And if he *has*, then the conversion isn't worth it to me.

Donal> I suppose it all depends on your definition of trivial, but
Donal> there are commercial applications out there written in Tcl/Tk
Donal> with over a million lines of code.  I do admit that systems of
Donal> that size (whatever written it) boggle my mind a bit
Donal> though... :^)

Let me qualify that statement, then.  I'm not saying that people don't
do it; my mail reader is somewhere around 35k lines of Tcl/Tk.  I'm
just saying that *I* wouldn't.
- -- 
Graham Hughes    http://A-abe.resnet.ucsb.edu/~graham/     MIME & PGP mail OK.
const int PGP_fingerprint = "E9 B7 5F A0 F8 88 9E 1E  7C 62 D9 88 E1 03 29 5B";
   #include <stddisclaim.h>

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBM03sUSqNPSINiVE5AQH7AwP+IeKlRcSJqNiJGlaJeSIzxpwynxZXJFcQ
TSa5T/+jM0V9X6nVYZp5tW8nU8eQ79hY/A02oVd3/2+lwvdDfwn/0zvWS55nEqO0
vcmpXY5WutT1pi4Ktk/oF/QPuB2lxb8oJKnY+6WlFQmrV7maHXM40Xovz+G3Hx3o
OvHhljtsPD8=
=BlBG
-----END PGP SIGNATURE-----


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

Date: 11 Apr 1997 02:13:57 -0700
From: "Graham C. Hughes" <graham.hughes@resnet.ucsb.edu>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <87iv1t2a6u.fsf@A-abe.resnet.ucsb.edu>

-----BEGIN PGP SIGNED MESSAGE-----

>>>>> "Donal" == Donal K Fellows <nospam.fellowsd@cs.man.ac.uk> writes:

Donal> What exactly do you mean by "subclassing"?  How can you be sure
Donal> that you need a C extension to do it with Tcl/Tk?  I have made
Donal> Tcl/Tk-only labelled frames, comboboxes and progress meters
Donal> quite easily, so it is entirely possible that you are simply
Donal> mistaken in your assertion.

Let me put it this way: you can define new Tcl functions so

my_button .foo -text "Bar" -command "puts foo"

works.  However, you have to do an incredible amount of work to get
this to work, because you have to define a function `.foo' with
half-a-hundred cases for everything you *might* want to do.  Also, you
run into name collisions; suppose .foo is some sort of wrapper about
 .foo__WHEE_IM_A_MANGLED_NAME.  How do you differentiate names?  How do
you allow

my_frame .foo ...
my_button .foo.bar ...

to work?

Compare this to

foo = My_Frame(root, ...);
bar = My_Button(foo, ...);

in Python.

>> - lists where accessing anything is an O(n) operation

Donal> What version are you talking about?  This (a long-standing
Donal> complaint of many Tcl entheusiasts) is no longer true in Tcl8.

Never used Tcl8, don't plan to.  The best thing about Tcl8 is that Tk
is finally moving away from its Tcl foundation, so I get all the
benefits of Tk in a real language.  Also, which implementation did
Ousterhout choose to support?  lindex and lappend have quite different
penalties, which is why STL supports vector<> and list<>.

Does Tcl8 do 8-bit strings yet?

>> - numbers that autoconvert when you don't want them to (on east
>> coast area codes, for example)

Donal> I believe this (another moan of great age) is fixed too.

Again, don't know about this.

However, these two changes alone implies some really major reworking
of the compiler, like adding a type system.  Does this mean that Tcl
is then shedding the `everything is a string' attribute that
Ousterhout considered so wonderful?

>> - non-extensible mathematical expressions (think expr here)

Donal> Fair enough, though I'd add that putting in your own stuff
Donal> (which does admittedly have a different syntax) is still not
Donal> hard.

True.  However, it is very different syntax.

Case in point:  I was considering Tcl for a built-in language for a
system I was going to rewrite.  I rejected it when I discovered that
 - Tcl doesn't have a rand() function in expr.
 - I couldn't put one in.
 - The alternative syntax would've been hairy.

I was trying to rewrite a MUD derivative, BTW, and a good random
number generator was essential; it would be used certainly much more
than sin(), hypot() or log10() in this context.

>> - call by name - dynamic scoping

Donal> These two are construable as a feature (though I would like the
Donal> other kind of semantics AS WELL... :^)

I can't really consider them that.  It causes real confusion, although
it's better than the situation in LISP 1.5...

>> and other assorted nastiness.  Even Perl is a breath of fresh air
>> compared to this.

Donal> For some things.

I'm talking about syntax, here.  Remember

while {1} {		# <- error! # is a _function_
}

Unless Ousterhout has changed Tcl so much that it isn't just a
glorified macro processor, the cost/benefit equation hasn't changed.
And if he *has*, then the conversion isn't worth it to me.

Donal> I suppose it all depends on your definition of trivial, but
Donal> there are commercial applications out there written in Tcl/Tk
Donal> with over a million lines of code.  I do admit that systems of
Donal> that size (whatever written it) boggle my mind a bit
Donal> though... :^)

Let me qualify that statement, then.  I'm not saying that people don't
do it; my mail reader is somewhere around 35k lines of Tcl/Tk.  I'm
just saying that *I* wouldn't.
- - -- 
Graham Hughes    http://A-abe.resnet.ucsb.edu/~graham/     MIME & PGP mail OK.
const int PGP_fingerprint = "E9 B7 5F A0 F8 88 9E 1E  7C 62 D9 88 E1 03 29 5B";
   #include <stddisclaim.h>

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBM04A3CqNPSINiVE5AQH4TAP/QOmSLxuoWThBgrIN9lSdCcH/YJ1AIaqF
knr4F3MALI/yopVHwebHEENS8GW77L7MaZNUdAhO3niNnHzfE7LsL564bdP0AKBP
urvAft5IIeZ36XhPt7IXZO8rTRq/qetHQsa9VXVHFc71kyljj6AXHXfe6I2VIg54
wkeSkFH38MM=
=ARhJ
-----END PGP SIGNATURE-----


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

Date: Wed, 09 Apr 1997 10:47:49 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: Perl-Books.
Message-Id: <fl_aggie-ya02408000R0904971047500001@news.fsu.edu>

In article <334A8ACA.1364@isy.liu.se>, Hulken <n94magho@isy.liu.se> wrote:

+ Can someone rekomend some good books about Lerning perl.

Indeedly doodlie! My [comments] follow.

Learning Perl, Randal L. Schwartz, ISBN 1-56592-042-2.

[a kindler, gentler introduction, suitable for people learning their first
 programming language, AKA the llama]

Programming Perl (2nd ed), Larry Wall, Tom Christiansen and Randal
L. Schwartz, ISBN 1-56592-149-6.

[my impression is that it is presumed that you've programmed before, tho
 probably not necessary, aka the camel]

I have both. I taught myself up on the llama book, and use the camel
book as a reference, particularly with regard to the intricacies of perl v5.

James

-- 
Consulting Minster for Consultants, DNRC

To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: 11 Apr 1997 10:34:52 GMT
From: "Santiago Alvarez Rojo" <santiago@gambito.com>
Subject: pm2html
Message-Id: <01bc4664$038d5840$7131a8c0@sg059pcs>

Is there a DOS translator from Perl Modules files to html?

I know it is included within the Linux distribution but do not know about
the DOS one. I'd like to get only this program, not to install the whole
package.

TIA.
Ps. I'd appreciate email reply
-- 
Santiago Alvarez Rojo
santiago@gambito.com
http://www.gambito.com/santiago


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

Date: 11 Apr 1997 09:51:41 +0200
From: Andreas Eder <are@laphroig.mch.sni.de>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <m37miangj6.fsf@laphroig.mch.sni.de>

Bill House writes:
>Hype alone won't make an intelligent shopper buy,

And what about all those not so intelligent shoppers ? 
Majority rules, you know.

Andreas


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

Date: 11 Apr 1997 08:39:21 GMT
From: danh@danpc.cris.com (Dan Haskell)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <slrn5krts1.8c.danh@danpc.cris.com>

In article <3069617830783259@naggum.no>, Erik Naggum wrote:
[snip]

>the Distinguished Professor of Computer Science has turned into a Marketing
>Droid.  how incredibly sad.
>
>| If you want to know the truth, I think you need to stop making
>| superficial excuses and ask deeper semantic questions.
>
>the way I read this debate, people are asking deep, semantic questions of
>Tcl and they get superficial excuses for answers.
[snip]

How sad for you if you think that ad homonym arguments and insults 
constitute deep semantic questions.  

Can we skip the attacks on Dr Ousterhout and discuss the issue at hand?



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

Date: Fri, 11 Apr 1997 08:10:06 +0200
From: joswig@lavielle.com (Rainer Joswig)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <joswig-ya023180001104970810060001@news.lavielle.com>

In article <hbaker-1004971904150001@10.0.2.1>, hbaker@netcom.com (Henry
Baker) wrote:

> Lisp is the ultimate 'fractal' language, because it is good at all levels,
> from microcode to shell scripts.

Amen.

-- 
http://www.lavielle.com/~joswig/


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

Date: 11 Apr 1997 11:47:34 GMT
From: rv@erix.ericsson.se (Robert Virding)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <5il8cm$f85$1@news.du.etx.ericsson.se>

In article <5ighvq$etn@engnews2.Eng.Sun.COM>, ouster@tcl.eng.sun.com (John Ousterhout) writes:
>                                                               Every single
>programmer who ever wrote a program in Tcl, Perl, C++, Visual Basic, or even
>C could have chosen Lisp, Scheme, or Smalltalk.  But they didn't.

This is a completely ridiculous argument. Try using it in other contexts.

"Every person who bought a 10-year old secondhand car could have
bought a new Ferrari instead. But they didn't."

-- 
Robert Virding                          Tel: +46 (0)8 719 95 28
Computer Science Laboratory             Email: rv@erix.ericsson.se
Ericsson Telecom AB
S-126 25 DLVSJV, SWEDEN
WWW: http://www.ericsson.se/cslab/~rv
"Folk sdger att jag inte bryr mig om negonting, men det skiter jag i".


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

Date: 11 Apr 1997 10:54:23 GMT
From: lvirden@cas.org
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <5il58v$me2@srv13s4.cas.org>


According to Erik Naggum  <erik@naggum.no>:
:
:* Douglas Seay
:| If I understand you correctly, you are saying that the definition of a
:| language (as opposed to a tool) is multiple implementations?
:
:I cannot fathom how you could draw that conclusion from what I wrote, but
:since you would have asked how I define languages to the exclusion of mere
:tools if you were able to recognize when you overstep your understanding:
:
:languages exhibit the property that they have more than one implementation.


Note that there _are_ at least two implementations of Tcl now (One is
in pure Java, the other in C).  Does that move 
it into the 'language' arena, despite there not being a formal definition?



-- 
Larry W. Virden                 INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.


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

Date: 11 Apr 1997 13:15:39 +0200
From: Tom Grydeland <tom@eiscat.uit.no>
Subject: Re: why can't arg 1 to shift be split?
Message-Id: <trzpv5std0.fsf@eiscat.uit.no>

hennessy@cloud9.net (Mathew A. Hennessy) writes:

> 	checked perlfunc,perlfaq4, no answer..

Oh, yes, there is...

> I want to do this:
> 	require perl5;
> 
> 	$user_name=shift( (split(/:/,$htpasswd_line)) );
> 
> However, I get this in reply:
> 
> Type of arg 1 to shift must be array (not split) at build-user_info.pl
> line 35, near ") )"
> Execution of build-user_info.pl aborted due to compilation errors.

Here, shift receives the LIST returned by split.

As the error message says, you need an ARRAY.  Note that an ARRAY is a
variable capable of holding a LIST.

> And, this works, but is extremely inelegant (IMHO):
> 	require perl5;
> 
> 	@crud=split(/:/,$htpasswd_line);
> 	$user_name=shift(@crud);

Here, shift receives an ARRAY and is happy.

> 	Now, what I am interested in knowing is if split returns a
> "second-class"  list of some kind..  Why can't I shift the list returned
> by split?  I'm not used to Perl telling me I _must_ do _anything_..

shift, unshift, pop, push and splice all require actual ARRAYs as
their first argument.

>From perlfunc:

[...]
     Functions for real @ARRAYs
          pop, push, shift, splice, unshift
[...]
     pop ARRAY
             Pops and returns the last value of the array,
             shortening the array by 1.  Has a similar effect to
[...]
     push ARRAY,LIST
             Treats ARRAY as a stack, and pushes the values of
             LIST onto the end of ARRAY.  The length of ARRAY
             increases by the length of LIST.  Has the same
             effect as
[...]


The @{[...]} solution proposed by another poster works by constructing
a reference to an anonymous array (the inner [...]) and dereferencing
that (the @{...}), thus providing a real (although anonymous) array
that shift() can shift.

ARRAY and LIST are not the same in syntax descriptions.

Also note the prototype section in perlsub, where mypop gets a
prototype of (\@), indicating it needs an ARRAY instead of a LIST.
(cf. _Programming Perl_, 2/e, pp. 118-121.

> Thanks,

You're welcome

> - Matt (hennessy@thoughtcrime.com)

-- 
//Tom dot Grydeland at phys dot uit dot no
            The case of Randal Schwartz - http://www.lightlink.com/fors/


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

Date: Fri, 11 Apr 1997 05:01:38 -0600
From: Filhol@esigelec.fr
Subject: Win32::ODBC  : need help!
Message-Id: <860751543.22597@dejanews.com>

I've just downloaded  Win32::ODBC and I have followed the instruction to
install it
so, the ODBC.pm and the odbc.pll are in the right place
But when I write a simple Perl Script, the compilation aborted on the
line:
use Win32::ODBC

I have this:
Can't locate Win32/ODBC.pm in @INC at C:\dbWeb\NTCCdata\script\form1.pl
line 15.

my script is situated in C:\dbWeb\data..... it's not a problem for the
other script which don't used the Win32::ODBC extension
is it a problem for this particular script?

thanks forany help..
regards
                                Laurent

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Fri, 11 Apr 1997 08:11:11 GMT
From: gordon.leslie.mcdorman@sap-ag.de
Subject: Re: Would like to test cgi-scripts offline.
Message-Id: <uwwqagesg.fsf@sap-ag.de>

exet0068@sable.ox.ac.uk (Joe Wickremasinghe) writes:

> Rather than log on to my ISP and waste money while I try to figure out
> cg scripting, is there any way I can run perl programs. , as cgi
> scripts, while offline? 

For simple testing, you may find the offline mode of cgi.pm useful.

<url:http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html>

-- 
-------------------------------------------------------------- 
The opinions expressed above are mine, not my employer's 
      
gordon.leslie.mcdorman@sap-ag.de                               


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 277
*************************************

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