[6726] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 351 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 23 06:07:14 1997

Date: Wed, 23 Apr 97 03:00:24 -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           Wed, 23 Apr 1997     Volume: 8 Number: 351

Today's topics:
     Re: 5.003 on Solaris 2.5 fails 8 tests (Casper H.S. Dik - Network Security Engineer)
     Any graphic module available? (fish)
     Re: C++Builder means Future. <mab@capita.nildram.co.uk>
     Re: Find something in a string <a.aitken@unl.ac.uk>
     Re: Get Chars up to first | without splitting <a.aitken@unl.ac.uk>
     HELP! Matching a multi line pattern and replacing it <i_dont@have.one>
     libnet for perl5.001 (Stephen Guidon)
     Re: Lisp is neither (was Re: Ousterhout and Tcl lost th <sdm7g@virginia.edu>
     Newbie Alert!  Problems getting netscape to recognize a <wpc@waterfordbikes.com>
     Re: Newbie Alert!  Problems getting netscape to recogni <a.aitken@unl.ac.uk>
     Re: Ousterhout and Tcl lost the plot with latest paper (Chris Bitmead uid(x22068))
     Re: Ousterhout and Tcl lost the plot with latest paper (Chris Bitmead uid(x22068))
     Re: Ousterhout and Tcl lost the plot with latest paper (SERRANO Manuel)
     Re: Ousterhout and Tcl lost the plot with latest paper <karl@NeoSoft.com>
     Perl 5 Live Chat! <dscarbrough@slip.net>
     Perl ODBC and IE 3.0x (Paul Hanssen)
     Re: Sorting On Columns of an Array of Data Question <b.leguen@ctr.renault.fr>
     Re: Split and IF / ELSE statements (Zach Baker)
     STDOUT | PAGER (Chipmunk)
     SV type changing (Andreas Schmidt)
     Re: They both suck! (was: Borland or Microsoft compiler (Stephan Schaem)
     Re: Variable interpolation (substitution) (Honza Pazdziora)
     Re: Who will win?  Borland or Microsoft or Programmers? <mbracey@interaccess.com>
     Re: wretched C++ (Was: Ousterhout and Tcl lost the plot <benh@cristie.co.uk>
     Re: wretched C++ (Was: Ousterhout and Tcl lost the plot <erik@naggum.no>
     Re: wretched C++ (Was: Ousterhout and Tcl lost the plot <erik@naggum.no>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 23 Apr 1997 08:11:53 GMT
From: Casper.Dik@Holland.Sun.COM (Casper H.S. Dik - Network Security Engineer)
Subject: Re: 5.003 on Solaris 2.5 fails 8 tests
Message-Id: <casper.861783349@uk-usenet.uk.sun.com>

peter@diamond.harvard.edu (Peter Leopold) writes:

>	I have been able to build *but unable to test successfully*
>5.003 on Solaris 2.5. I build with "sh ./Configure -des". The
>following eight tests fail:
>	lib/anydbm
>	lib/filehand
>	lib/ndbm
>	lib/odbm
>	lib/posix
>	lib/safe
>	lib/sdbm
>	lib/socket
>	lib/soundex

>	The failed tests all have the same test diagnostics:

>lib/anydbm.....Can't load '../lib/auto/Fcntl/Fcntl.so' for module
>Fcntl: ld.so.1: ./perl: fatal: relocation error: symbol not found:
>main: referenced in ../lib/auto/Fcntl/Fcntl.so at ../lib/DynaLoader.pm
>line 140.


You need to rebuild perl.


You've build it with gcc and you've build teh shared libraries with
gcc -G.

You need to reconfigure and have perl build teh libraries with "gcc -shared".

(And you should *also* avoid GNU ld and as while doing that)

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.


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

Date: 23 Apr 1997 07:46:39 GMT
From: gis84514@cis.nctu.edu.tw (fish)
Subject: Any graphic module available?
Message-Id: <5jkeov$fmr@news.cis.nctu.edu.tw>

Hello..

I use perl to write CGI programs, it will process some data and then
draw a graph and send back to the browser..
Is there any module that can handle this?
I know pgerl, but it require fortan compiler....
and gnuplot can't draw gif file....
any other available? Thanks a lot!


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

Date: Wed, 23 Apr 1997 10:34:58 +0100
From: "Martin Bradford" <mab@capita.nildram.co.uk>
Subject: Re: C++Builder means Future.
Message-Id: <335dd756.0@scooby.nildram.co.uk>


 scott@lighthouse.softbase.com wrote in article <5jg3r2$a4p$1@mainsrv.main.n
c.us>...
>34110s96@student.csi.cuny.edu wrote:
>: I just got C++Builder and I have never seen a powerful RAD tool like
>: this  one.  Forget about the Visual Crap.  C++Builder is the King of
the
>: Hill and not Marketing hype of Microsoft. 
>
>: Any comments are welcome.
>: Delphi is the definition of RAD
>: C++Builder is the future.
>
>JBuilder is the future, because it will create platform-indpendent
>Java GUI programs.

Except that the platform-independent Java GUI is so crude that you would
not want to use it!

>
>Scott
>
> 




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

Date: Wed, 23 Apr 1997 10:02:43 +0100
From: Alastair Aitken <a.aitken@unl.ac.uk>
Subject: Re: Find something in a string
Message-Id: <335DD033.2B8D@unl.ac.uk>

Dustin0123 wrote:
> 
>         How do you find characters within strings?  For example, let's say:
>         $day = "A nice day today"
>         How would I find 'nice' in $day?

if (index($day,"nice") >= 0) {
	&do_this;
}

The index() function finds the first occurence of the substring "nice"
in $day.  As with substr(),
index() starts at 0 for the first position in #day, as if all the
characters made up an array:
@day_characters.  If the function in the condiion above returns a value
greater than or equal to 0
then you have a hit and index() can tell you the start position should
you wish to extract it.

Alastair.


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

Date: Wed, 23 Apr 1997 10:09:12 +0100
From: Alastair Aitken <a.aitken@unl.ac.uk>
Subject: Re: Get Chars up to first | without splitting
Message-Id: <335DD1B8.26E2@unl.ac.uk>

christop@ozinter.co.jp wrote:
 
> 001|something|something else|and some more
> Can I extract the characters up to the first occurrence of | ?
> Currently I'm splitting the whole line into $FirstBit and the rest into
> $junk1,$junk2 etc but this seems a long way round perhaps ?  There could
> be any number of characters before the |.

open(IN,"test.dat");
while ( <IN> ) {
    $FirstBit = substr($_,0,index($_,"|"));
}

Alastair.


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

Date: Tue, 22 Apr 1997 18:09:39 -0000
From: "David Millier" <i_dont@have.one>
Subject: HELP! Matching a multi line pattern and replacing it
Message-Id: <5jjo55$4ko@news.co.intel.com>

I need to match somthing that looks like this:
New files in F:\ozzy_data\buckeye

 04/03/97 05:35p 59,525 Backup of index.wbk
 04/04/97 01:42p 59,591 index.htm
 03/26/97 11:26a 2,179 Whats_New.txt
 
 New files in F:\ozzy_data\buckeye\OEM_DOCUMENTS

 
 New files in F:\ozzy_data\buckeye\OEM_DOCUMENTS\CUSTOMER_NOTIFICATION


Need to remove the "New files in ........." followed by two blank lines.
This takes out the listings of new files in directorys that have none. I am
simply having trouble matching a multi-line string(cant use foreach)
recursivly. Thanks in advance for any help. PS. Reply here, i have no email
currently.




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

Date: Wed, 23 Apr 1997 10:44:37 BST
From: scg@Physics.DCU.IE (Stephen Guidon)
Subject: libnet for perl5.001
Message-Id: <9704230946.AA05971@ruby.OCE.ORST.EDU>

I want to do some work using perl and ftp. I got the 'libnet dist'
from CPAN, but this requires perl 5.003. 

Currently we are using perl 5.001.

Does anyone know where I can get libnet for this version of perl, or does 
anyone have routines to enable a perl script to access or control ftp. 

Any pointers or tips on using perl with ftp gratefully recieved. 

(if possible cc me a copy of your post).

Many thanks,

Steve.



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

Date: Wed, 23 Apr 1997 07:44:30 GMT
From: "Steven D. Majewski" <sdm7g@virginia.edu>
To: "John Ousterhout" <ouster@tcl.eng.sun.com>, python-list@cwi.nl
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <AF833653-1B6390@128.143.7.189>

On Sat, Apr 19, 1997 5:20 PM, John Ousterhout
<mailto:ouster@tcl.eng.sun.com> wrote:
>
>Let's take Lisp as an example.  I think that Lisp falls somewhere
>between scripting and system programming.  Many of you have suggested that
>it is an ideal language for both system programming and scripting, but I
>think that it isn't really very good for either.  In fact I suspect that
>this may be why Lisp hasn't been used much for practical programming.

[ ... ]

>Just to short-circuit the discussion that will ensue...
>
>I'm sure that many of you will argue against these claims ("my new
>version of Scheme is just as fast as C", "Lisp just needs a new garbage
>collector that embodies the latest techniques", "I know someone who
>combined C with Scheme and had no problems at all", etc.).  However,
>I've seen a fair amount of evidence on this and the problems far
>outnumber the success stories.  Many of the best minds in Computer
>Science have worked on Lisp over the last 30 years, and they haven't
>been able to fix the language so that it could be widely used either
>for system programming or scripting tasks.  This says to me that there
>is something fundamentally wrong with the language, at least for these
>tasks.
>


John -- your explaination is even worse that the original paper!

> In fact I suspect that this may be why Lisp hasn't been used 
> much for practical programming.

You throw in assertions like this with no mention of evidence or
a source for this conclusion. 

I'm using lisp for practical programming: statistics, graphics,
data-analysis,
converting foreign file formats. ( I'm not in comp. sci. -- I'm in the Med
school, so I'm not as interested in the elegant mathematics properties
of Lisp as the fact that it's an excellent tool. ). I know of lots of other
people using it for practical programming, including all of the people
doing statistics with XLispStat, all of the people writing applications 
and utilities in emacs lisp, and all of the people writing AutoCad
extensions
in lisp. 

What is the basis for statements about lisp not being widely used or about
the failure of Lisp ? 

It may be the case that there are more Tcl users than Lisp users, but I 
haven't seen even a poor attempt at a bad estimate made. Just the 
assertion that Tcl is a success and Lisp is a failure. 

How would you attempt to make such an estimate ? 

Number of downloads of software:
 Well, there are many download sites for Tcl. There are not only
many download sites for lisp, there are many different implementations
and there are also several different commercial implementations. 
And how do you rate embedded products. Many people get lisp in
autocad or emacs, but only a minority of users ever program it. How
does that count. Same problem with Tcl applications. 

Size and number of postings to usenet groups: 
Not reliable. Since there are more Lisp books and it's been around much
longer, maybe there aren't as many people asking questions on usenet. 
It may not be a valid sample. 

Number of books and articles published. 
 Lisp has the edge here. Tcl may be gaining. But it's still an
unlikely metric. 
 
Surveys: 
  There are sample and coverage problems with surveys. The few
 large scale surveys I've seen,  neither Lisp nor Tcl register as blips.
 They are burried in the "Other" catagory.  Real use may be better,
 as the coverage of some of those surveys would seem to be weighted
  towards larger ( more conservative?) organizations. 

If you have some evidence, then give it to us! [ I wish academic
Comp. Sci. were more interested in some practical basic questions
like that, but it's not an exciting project, and nobody is interested
in funding it. The same goes for some cross-language productivity
studies larger than making a button. These are things that would
take a lot of work, would have a clear scientific benefit, and are 
totally boring and unsexy research. ] 


Even if we do accept it likely that there are more Tcl than Lisp users:

[1] Is this a long term trend ? Computer Languages seem to follow
the same sort of trends and psychology that's been documented for
other technologies. There are early adopters who are looking for 
novelty, and there are the belt-and-suspenders crowd who will avoid
anything until it's time tested and proven. It's likely that there is 
a temporal pattern, and that Tcl is riding the crest, while Lisp is
at a steady state. When Tcl settles to it steady state, will it still 
have a large volume of users ? The novelty seekers may be onto
something new!

[2] Whatever the comparative volume for Lisp and Tcl, they are 
both clearly fighting it out with two dozen other languages for the
"other" category, left over after Cobol, Fortran, C, C++, Basic, 
and now probably Smalltalk and Java. If you are arguing success 
by popularity, you're on pretty shakey and not statistically significant
ground. 


I do think that Tcl has done several things right, and that Lisp
has done several things wrong. 
But after nearly 40 years, we can say without much doubt that
Lisp has been one of the great intellectual successes in computer
languages. Like - what was it, Algol 60 that this was said about ? -
It's a great improvement over most of it's successors. 

It would be unfair for me to ask where will Tcl be in 4o years.
I don't think that is the proper standard to apply. We're not
interested in posterity, but in practical tools now. But, I likewise
feel that judging Lisp by how many millionaries it may or may
not have created, compared to Basic or Unix is not the proper
standard for success or failure.  Lisp has been a success as an
idea and it's been a success as a tool, and it's got a more solid
track record in that regard than Tcl. I think there *was* a good
idea in that paper trying to get out, but this sort of thing does
more damage to your argument by undermining your credibility. 
I believe its more due to carelessness than to maliciousness,
but "careless with the truth" does not sound very complimentary. 


- Steve Majewski
<sdm7g@Virginia.EDU>


P.S. 
  I've used Tcl, and I can attest: 
 "The problems outnumber the  success stories." 





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

Date: Sun, 20 Apr 1997 10:35:06 -0500
From: Richard Schwinn <wpc@waterfordbikes.com>
Subject: Newbie Alert!  Problems getting netscape to recognize a perl script.
Message-Id: <335A37AA.5B34@waterfordbikes.com>

I've entered a simple program and loaded in my directory on our UNIX
server.  I can run the program through telnet by invoking PERL directly
but I can't get Netscape to recognize the script as a PERL program. 
Netscape treats it like an HTML file and doesn't recognize the commands?

Here's how I invoke the program from Netscape:

<A HREF=http://www.waterfordbikes.com/prall.pl?Passed-argument>Try this
to run the program</A>

Here's the actual code:

#!/usr/bin/perl
# prall.pl
#

print "Content-type:  text/html\n\n";

if(@ARGV == 0)
{
print "<HEAD><TITLE>The print everything
form</TITLE><ISINDEX></HEAD><BODY>";

print "GET form:";
print "<FORM METHOD=GET ACTION=/$action>";
print "Field 1<INPUT NAME=FIELD1>";
print "Field 2<INPUT NAME=FIELD2>";
print "<INPUT TYPE=submit VALUE=SUBMIT>";
print "</FORM>";
print "POST form:";
print "FORM METHOD=POST ACTION=/$action>";
print "Field 1<INPUT NAME=FIELD1>";
print "Field 2<INPUT NAME=FIELD2>";
print "<INPUT TYPE=submit VALUE=SUBMIT>";
print "</FORM></BODY>"  ;

if($ENV{REQUEST_METHOD} eq "GET")
  {	read(stdin, $input_line, $ENV{CONTENT_LENGTH});
	print "You made a GET Request<BR>";
	print "passing:  $input_line<BR>";
	print "to <I>stdin</I><BR>";
   }

elsif($ENV{REQUEST_METHOD} eq "POST")
  {	read(stdin, $input_line, $ENV{CONTENT_LENGTH});
	print "You made a POST Request<BR>";
	print " $input_line<BR>";
	print "to <I>stdin</I><BR>";
   }

else
   {	print "I don't understand the REQUEST_METHOD: 
$REQUEST_METHOD<BR>";}

}  #end argv if test

else

{
print "<HEAD><TITLE>The print everything
form</TITLE><ISINDEX></HEAD><BODY>";

print "GET form:";
print "<FORM METHOD=GET ACTION=/$action>";
print "Field 1<INPUT NAME=FIELD1>";
print "Field 2<INPUT NAME=FIELD2>";
print "<INPUT TYPE=submit VALUE=SUBMIT>";
print "</FORM>";
print "POST form:";
print "<FORM METHOD=POST ACTION=/$action>";
print "Field 1<INPUT NAME=FIELD1>";
print "Field 2<INPUT NAME=FIELD2>";
print "<INPUT TYPE=submit VALUE=SUBMIT>";
print "</FORM></BODY>" ;
print "This is an <B>ISINDEX</B> query:<BR>";
print "and you input: @ARGV  ";
}

print "<PRE>";
print "REQUEST_METHOD:   $ENV{REQUEST_METHOD}\n";
print "Command line arguments:  @ARGV\n";
print "QUERY_STRING:  $ENV{QUERY_STRING}\n";
print "PATH_INFO:   $ENV{PATH_INFO}\n";
print "</PRE>\n";
print "<HR>";
print "back to <A HREF=$progname>Print Everything</A><BR>";

exit;


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

Date: Wed, 23 Apr 1997 10:17:57 +0100
From: Alastair Aitken <a.aitken@unl.ac.uk>
Subject: Re: Newbie Alert!  Problems getting netscape to recognize a perl script.
Message-Id: <335DD3C5.45A5@unl.ac.uk>


Richard Schwinn wrote:
> 
> I've entered a simple program and loaded in my directory on our UNIX
> server.  I can run the program through telnet by invoking PERL directly
> but I can't get Netscape to recognize the script as a PERL program.
> Netscape treats it like an HTML file and doesn't recognize the commands?
> 
> Here's how I invoke the program from Netscape:
> 
> <A HREF=http://www.waterfordbikes.com/prall.pl?Passed-argument>Try this
> to run the program</A>
> 
> Here's the actual code:
> 
> #!/usr/bin/perl
> # prall.pl

Either the file is in the web server's cgi-bin directory (which it
doesn't look like it is)
or the server itself is enable for cgi as a filetype in which case the
norm is for executables
to have ".cgi" at the end of their name.  Try calling your script
"prall.pl.cgi" and then call it
through the server.  If that doesn't wotk then ".cgi" is probably not an
executable file type on your
server.

Please note that this is not a perl problem - its a cgi problem:
comp.infosystems.www.authoring.cgi

Alastair.


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

Date: 23 Apr 1997 16:39:27 +1000
From: Chris.Bitmead@alcatel.com.au (Chris Bitmead uid(x22068))
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <s6yiv1emee8.fsf@aalh02.alcatel.com.au>


will@peanut.jpl.nasa.gov (Will Duquette) writes:

> 1. I like traditional expressions and control structures.
>    A C programmer can get the gist of a Fortran, BASIC, Pascal,
>    Ada, or Java program without too much effort.  The syntax isn't 
>    identical, but the basic model is much the same.

Don't know what you mean by traditional control structures, but
Smalltalk control structures don't seem too different to C in practice.
 
> 2. (And this is the kicker) I really dislike having my application
>    and the Smalltalk library classes live in the same "space".  In the
>    Smalltalk system I've looked at (Smalltalk V), if I wanted to
>    develop two separate applications they either needed to live in the
>    same class tree, or I needed to maintain too entirely separate
>    "images", which included all of the system classes.  This gives me
>    chills, for some reason.
> 
> As someone on this thread has commented, OOP in Java is more like OOP
> in Smalltalk than it is OOP in C++, and I think this is true...but in
> Java, there's a nice clean separation between my code and anybody
> else's code.  I like that.  Again, this may be a purely psychological
> issue, but then, I program better when I'm happy. :-)

I think it's purely psychological. :-) Think of the image as an
instant compilation of your code changes. To use the same code in two
images you need to export. The equivilent in C++ is building a
library, installing the library in a common place and then linking
with it. On the whole a lot more painful for C++.



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

Date: 23 Apr 1997 16:48:51 +1000
From: Chris.Bitmead@alcatel.com.au (Chris Bitmead uid(x22068))
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <s6yhggymdyj.fsf@aalh02.alcatel.com.au>


"Graham C. Hughes" <graham.hughes@resnet.ucsb.edu> writes:

> I don't traditionally program in Scheme or Common LISP,
> not because I don't have interpreters or compilers for them, but
> because they aren't good enough at string processing to interest me.

I must disagree. I find scheme *wonderful* for string
processing. Using map and filter functions and for-each, you can do
incredible things in a few lines of code. And it's fast too!



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

Date: 23 Apr 1997 06:54:38 GMT
From: serrano@divsun.unige.ch (SERRANO Manuel)
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <5jkbne$sji@uni2f.unige.ch>

Bigloo is a compiler for an extended version of Scheme.
May you should have a look.

Bigloo contains:
  - a foreign interface (not restricted to foreign _function_ interface)
  - a module language (mostly to allow batch compilation)
  - several libraries (such as parsing libraries, pattern matching, ...)
  - a native object system based on generic functions.
  - a macro system.

To taste all this, you can pick the Bigloo documentation at: 
http://cuiwww.unige.ch/~serrano/bigloo.html

I hope it will help.

  --Manuel Serrano--


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

Date: Wed, 23 Apr 1997 04:13:56 -0500
From: Karl Lehenbauer <karl@NeoSoft.com>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <335DD2D4.167EB0E7@NeoSoft.com>


Bjarne Stroustrup wrote:

>         The furthest I go is to claim that unless C++ had at least some
>         of the virtues I claim for it, it would have died during the
>         early years where there were essentially no C++ marketing and
>         alternatives languages with marketing dollars behind them existed.

Hear, hear!

Likewise corporate backing of Tcl is a very recent thing.  For a long
time it was just a few enthusiasts with a mailing list and then later a
few thousand enthusiasts with a newsgroup.  Getting your company to use
Tcl was as hard a fight as getting most companies to try any other new
thing.

I think it's interesting that where one LISP guy's list of essentials
were "full dynamism, introspection, procedural macros, lexically-scoped
closures and generic functions and no static typing", mine, when I was
looking for a scripting language back in 1988, were that it be
embeddable, interpreted, have a reasonably small footprint, be good with
text, and be easy to plug C code into.

LISP had a 25 year headstart and a hell of lot more funding.  Tcl's
competition, in terms of what languages people use instead of Tcl to do
the sorts of things that people do in Tcl, has mainly been PERL, IMHO,
with a bit of ksh, awk, Python, etc., as well.

This has not stopped the periodic trolling through comp.lang.tcl by LISP
and Scheme weenies trying to pick a fight.

I think Tcl is popular because a lot of programmers found that scripting
languages were powerful and useful additions to applications, and that
Tcl was free and pretty easy to pick up and plug into an app.

So anyone who wants to say Tcl's marketing is what has made it
successful, well, old timers just have to laugh.  And these threads seem
be an argument between the theorists who love LISP and the pragmatists
who have an app and a deadline and want to find something that works and
use it and ship the thing and move on to the next project.

I can guess how the scathing rebuttal will go...  "It's precisely the
crap foisted on everyone by the pragmatists that we LISP weenies are
trying to fix.  But look at these two dead company's most excellent LISP
machines.  Etc."

The "battle" is a battle for mindshare.  That battle is fought one
mind... one program... at a time.  So we Tcl weenies just keep on
chooglin'.  If you're a committed bike rider and you turn into a strong
headwind, you don't get mad, you just downshift, put your head down, and
pedal.  And before too long, you've ridden pretty far.  You want LISP's
influence to increase, you're not going to get people to do it your way
by flaming them.  You've gotta remove obstacles to its use, pump out
tools and apps, help people who run into problems, and push out the
examples and games and clever little hacks that pique peoples'
curiosity.  You gotta sell it to the people who would use it.  And make
sure it really is as general purpose as you say... Like rewrite some
shell scripts in it.  But a lot it seems like the attitude of the LISP
camp toward workaday programmers ranges from condecension to derision to
outright contempt.  You want LISP to do better? Lose the attitude, and
make sure you have a good, free implementation that runs real well on
Windows 95.


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

Date: Tue, 22 Apr 1997 23:08:54 -0500
From: Diana Scarbrough <dscarbrough@slip.net>
Subject: Perl 5 Live Chat!
Message-Id: <335D8B56.423@slip.net>

Find out why Perl is one of the easiest-to-use programming languages
with Perl 5 For Dummies author, Paul Hoffman on April 23rd from 6:00
p.m. to 7:00 p.m. PST. To participate, or for more information, visit 
the...For Dummies Web site at http://www.dummies.com/community/chat. 
Or go directly to:
IRC Chat: chat.talkcity.com 
port 6667
Channel: #dummies

**Attend an IDG Books' Online Author Chat and you'll have the 
opportunity to win a free book!**


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

Date: Wed, 23 Apr 1997 07:45:05 GMT
From: paulh@sanford.com.au (Paul Hanssen)
Subject: Perl ODBC and IE 3.0x
Message-Id: <335db840.25945197@news.per.aone.net.au>

Hi there,

I am accessing an ODBC database (Microsoft SQL Server 6.5) through
Perl  5 (using the Win32::ODBC module). IIS 3 is our WWW server.

It all works fine on Netscape 3+ but I keep getting an error
containing the following message using Internet explorer 3.0x

  Could not Connect to DSN:
  Error: [18450] [] "[Microsoft][ODBC SQL Server Driver][SQL   
  Server]Login failed- User: _ Reason: Not defined as a valid user of

  a trusted SQL Server connection. "

Has anyone encountered this problem before ? If so, any suggestions ?
Is it because IE 3 integrates too heavily with other Microsoft
products ?

BTW - We are NOT running a trusted connection to SQL Server.

Thanks

Paul Hanssen
paulh@sanford.com.au
Paul Hanssen
Graduate Software Engineer
Australian Informatics Pty Ltd


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

Date: Wed, 23 Apr 1997 11:17:38 +0100
From: Bertrand Le Guen <b.leguen@ctr.renault.fr>
To: frank@primemail.com
Subject: Re: Sorting On Columns of an Array of Data Question
Message-Id: <335DE1C2.167E@ctr.renault.fr>

Frank Fisher wrote:
> 
> I have a customer array with the following type of data:
> 
> john smith 1234 main st CA 90245 310-456-9876
> How can I sort this data for different reports on certain colums?
> For example, how would I sort on the 2nd field the lastname field? or
> sort on the State field?  I read the sort() function my perl book but
> it does not cover sort on columns.
> Thanks...
if you have a file containing those array
file.dbf
========
john smith 1234 main st CA 90245 310-456-9876
jihn smoth 4321 main st CA 90245 310-456-9876
[eof]

open (FILE,"$file");
@LINES=<FILE>;
close(FILE);

@SORTLINES = sort {
   @aline = split (' ',$a);
   @bline = split (' ',$b);
   ($aline[2] <=> $bline[2]) || ($aline[1] cmp $bline[1]);
} @LINES;

the result will be sorted 
 1 numerically for the field number 2
 2 alpha-numericaly for the field number 1

hope this helps
-- 
Bertrand Le Guen
CAD/CAM & SGI/Unix Admin 
Web Master (Intranet)
mailto:b.leguen@ctr.renault.fr


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

Date: 23 Apr 1997 07:31:58 GMT
From: zbaker@venom.st.hmc.edu (Zach Baker)
Subject: Re: Split and IF / ELSE statements
Message-Id: <5jkdte$7k4$1@cinenews.claremont.edu>

In article <335d0c37.3426594@news1.pei.sympatico.ca>,
Dico Reyers <dico@peionline.com> wrote:
>
>This doesn't work....  can someone looks the code below and perhaps
>tell me why?

Well first of all the way it was posted was a mess.  Have another look
at it with your 'print' strings split in a more perl-like fashion and
with consistent indentation.  By the way, posts with tab characters in
are harder to read than they may already be. =^)

I think if you look at your code like this your apparent brace
problems are easier to catch.  By the way, perl blocks end in "}" so
using "};" at the end of blocks is, um... questionable.

(begin reformatting of original poster's code)
if (open (SCART, "$path$cart_value")) {
    $line = <SCART>;
    if ($line ne "") { 
        print "<center><tablewidth='98%'>",
              "<tr bgcolor='bbbb99'>",
              "<td>\nProduct Number</td>",
              "<td>Quantity</td><td>Price</td></tr>\n";
        $x = 1; 
        while ($line ne "") {
            @item = split(/:/, $line);
            if ($item[0] eq "1") {
                print "Item one\n";
            }
            elsif ($item[0] eq "2") {
                print "Hello there...\n";
                else {
                    print "Who cares\n";
                }

                print "<tr><td>$item[0]</td><td>$item[1]</td><td>",
                      "$itemprice</td></tr>\n";
                $line = <SCART>;
            }

        };

        if ($x = 1) {
            print "</td></tr></table></center>\n";
        };
    }
    else { 
        print "It didn't open the cart"; 
    };
(end reformatting of original poster's code)

There!  Much better.  By the way, I think you owe me an end brace (!).

And I'm required to give you the public service message that everyone
should program using 'perl -w' and the 'use strict;' directive.

---
Zach Baker <zbaker@venom.st.hmc.edu>
"I may have missed a date with my TV, but I made a NEW FRIEND!"


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

Date: 23 Apr 1997 03:54:31 GMT
From: Ronald.J.Kimball@dartmouth.edu (Chipmunk)
Subject: STDOUT | PAGER
Message-Id: <5jk15n$utu$1@dartvax.dartmouth.edu>

My perl program pipes some of its output through a pager:
    $pager = $ENV{PAGER} || 'more';
    open (PAGER, "| $pager") or *PAGER = *STDOUT;

Unfortunately, if the pager is more, and I exit more in the middle of
the output by typing 'q', my perl program exits with the message
'Broken Pipe'.

How can I make the perl continue execution normally if someone exits
the pager before reaching the end of the output?

thanks,
Chipmunk


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

Date: 23 Apr 1997 09:23:49 GMT
From: schmidt@miserv2iai.kfk.de (Andreas Schmidt)
Subject: SV type changing
Message-Id: <5jkkf5$20q$1@nz12.rz.uni-karlsruhe.de>
Keywords: xsub, Devel::Peek, SV

hi,

i was playing around with the Devel::Peek package and the internals of the
perlguts, perlxs manpages. 

while doing this, i wrote a little script like this:

--------- start -----------

#!/public/tools/bin/perl -w 

use strict;

my $lastcase = 1;
print "1..$lastcase\n";

BEGIN {
    unshift(@INC,'/home/schmidt/lib/perl/lib/site_perl');
    unshift(@INC,'/home/schmidt/lib/perl/lib/site_perl/sun4-solaris');
}

use Devel::Peek 'Dump';


my $is_transient = 6;
Dump $is_transient;
$is_transient += 2;
Dump $is_transient;

---------end----------
 
the output of the script is the following:

1..1
SV = IV(0xbd834)
  REFCNT = 1
  FLAGS = (PADBUSY,PADMY,IOK,pIOK)
  IV = 6
SV = PVNV(0xbc5a8)
  REFCNT = 1
  FLAGS = (PADBUSY,PADMY,NOK,pNOK)
  IV = 6
  NV = 8
  PV = 0

now my question is: why does the addition in line '$is_transient += 2;' changes
the type of the SV $is_transient to double?


any ideas ?

thanks in advance
smiff
========================================================================
andreas schmidt                                email: schmidt@iai.fzk.de 
institut fuer angewandte informatik (iai)        phone: +49 7247 82 5714
forschungszentrum karlsruhe gmbh
    - technik und umwelt -       
postfach 3640                                  76021 karlsruhe (germany)





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

Date: Tue, 22 Apr 1997 23:59:07 GMT
From: t21@ix.netcom.com (Stephan Schaem)
Subject: Re: They both suck! (was: Borland or Microsoft compilers ?)
Message-Id: <5jkff8$dqq@dfw-ixnews12.ix.netcom.com>

In article <5ja3nu$9as$1@diana.ibernet.es>, Santiago Mediodia <moony@maptel.es> wrote:
>Da Borg <vla_di_mip@uniserve.com> escrituras: > [.............]
>> > >       My company is planning to start a project.  We have a big question
>> > > about our investments.  We don't know if we should use Microsoft
>> > > compiler or Borland.  Some myth we heard over the net.
>> > >
>> > > 1) 90% of the programmer uses Microsoft Compiler.
>> > > 2) Borland will vanish in 2 years (NASDAQ:BORL)
>> > > 3) Borland has better compiler
>> > > 4) 99% of the College in US have/use Borland Compiler.
>> > >
>> > > Some one show us the way?
>> 
>I cant understand why is people still using Microsoft or Borland to 
>make projects. Just, if I see the size of an integer in my Pentium with
>Borland, it gives me 2 bytes so 16 bits, and isnt the size of the integer , the
>the size of the data bus? Something is wrong 'cause Linux gives me 4 bytes
>so 32 bits, and thats really the size of the data bus in a Pentium...
>

 Actually the data bus is 64bit... int is more representative of the regiter 
 size.

>Another one, Borland gives me restrictions when i ask for memory. Only 64
>k I think, but not it linux, you can ask for 1, 2 Megas, it doesnt matter
>
>Another one. Linux is free so, very cheap, Microsoft or Borland ....
>

 linux is not a compiler.... and cant you run gcc under dos/windows?

 Stephan


>
>


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

Date: Wed, 23 Apr 1997 08:14:52 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Variable interpolation (substitution)
Message-Id: <adelton.861783292@aisa.fi.muni.cz>

John Adamson <j-adamson@tamu.edu> writes:

> Could use some advice on variable interpolation (as Wall uses 
> the term) in a conditional statement.
> 
> Consider this simple statement:
>   for ($i=1;$i<=10;$i++){print "$i\n";}
> 
> Is it possible to use:
>   for ($arg1;$arg2;$arg3){print "$i\n";}
> where $arg1-3 are defined elsewhere?
> 
> Seems like it oughta be simple but haven't been able to get 
> it to work.  Thoughts will be appreciated and - if this is an 
> incredibly dumb question - well, heck, I'm sorry.  TIA ..

You might either want what you have written above, which is "regular"
for loop with three parts separated by semicolon. Then however you
should do something with the values of variables $arg1-3 inside the
loop. Remember that normal for simply evaluates the first expression
at the beginning and them upon each iteration it checks the return
value of the second expression and if it's true, does the third and
evaluates the body of the loop. The same as in C.

You might wanted the second meaning:

$arg1 = 6;
$arg2 = 9;
$arg3 = 2;
for $i ($arg1, $arg2, $arg3){print "$i\n";}

Here for is a shortcut for foreach and it says: set value of $i to
each of those in the list and then evalueate the body of the loop.
Here you have commas instead of semicolons, to show that it's a list
of three values.

Hope this helps.

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Wed, 23 Apr 1997 03:30:26 -0500
From: Mark Bracey <mbracey@interaccess.com>
Subject: Re: Who will win?  Borland or Microsoft or Programmers?
Message-Id: <335DC8A2.7135@interaccess.com>

hbaecker@island.net wrote:
> 
> On Sun, 20 Apr 1997 11:15:29 -0500, Mark Bracey
> <mbracey@interaccess.com> wrote:
> 
> >hbaecker@island.net wrote:
> >
> >> Borland Delphi 2 is incredibly difficult to use.
> >
> >
> >You are kidding...right?
> 
> No, I assure you I am not, when compared to Borland Pascal 7 with OWL,
> or Tcl/Tk. Delphi is a complex hazard, with incomplete helpfiles
> (activate a link and often the  dialog telling you to see your vendor
> (Borland in my case) for a complete Helpfile appears. And its another
> of those "feature rich" messes.
> 
> Harry

Did you know the help files have been fixed?  They are available from
Borland's web site.  I haven't had a missing link since I updated mine
(About 6 months ago).  If you got into it, you would be surprised how
good the VCL is.

Mark


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

Date: Wed, 23 Apr 1997 10:59:07 +0100
From: Ben Hanson <benh@cristie.co.uk>
Subject: Re: wretched C++ (Was: Ousterhout and Tcl lost the plot with latest paper)
Message-Id: <335DDD6B.6AC8@cristie.co.uk>


Thant Tessman wrote:
>         #pragma instantiate B<whatever>
> 
> There were no warnings, and no clues about what I was doing
> wrong.  dynamic_cast just consistently returned zero.
> 
> C++ is *full* of bullshit like this and I've spent way too
> much of my life fighting it.
> 
> -thant

Fair comment. Shoot the compiler writer. (Actually shoot the company who
decided releasing sub-standard product was acceptable!!)

Ben


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

Date: 23 Apr 1997 09:04:57 +0000
From: Erik Naggum <erik@naggum.no>
Subject: Re: wretched C++ (Was: Ousterhout and Tcl lost the plot with latest paper)
Message-Id: <3070775097664615@naggum.no>

* Thant Tessman
| C++ is *full* of bullshit like this and I've spent way too much of my
| life fighting it.

it was C++ that finally made me realize that I should pursue Common Lisp as
my programming language of choice.  that was after I had written about 2000
lines of C++ code in a hacked-up language that I processed with Emacs Lisp
to reduce the phenomenal clutter and redundancy of C++.  my code was 600
lines in this proto-language, and 300 lines of Emacs Lisp.  I had
reinvented a tiny portion of CLOS.  if it were not for C++, it might have
taken more a little longer to get to Common Lisp.  my conclusion was that
"life is too long to know C++ well", and that in C++, "reinvention is its
own reward".

#\Erik
-- 
Bastard Sex Therapist from Hell: "Read the F*cking Manual!"


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

Date: 23 Apr 1997 09:33:34 +0000
From: Erik Naggum <erik@naggum.no>
Subject: Re: wretched C++ (Was: Ousterhout and Tcl lost the plot with latest paper)
Message-Id: <3070776814510479@naggum.no>

* Ben Hanson
| Fair comment. Shoot the compiler writer. (Actually shoot the company who
| decided releasing sub-standard product was acceptable!!)

I really don't think genocide is a good idea.

#\Erik
-- 
Bastard Sex Therapist from Hell: "Read the F*cking Manual!"


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

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

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