[6644] in Perl-Users-Digest
Perl-Users Digest, Issue: 269 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 10 11:17:17 1997
Date: Thu, 10 Apr 97 08:00:34 -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 Thu, 10 Apr 1997 Volume: 8 Number: 269
Today's topics:
Re: 5.003 Fails compiling... (Broekstra J)
Re: arrg (David Alan Black)
can it be done (John Hardy)
Re: CGI programming HELP!!!!! (Tad McClellan)
Re: CGI programming HELP!!!!! (Chris Nandor)
Re: DBM problem (Douglas Young)
Help! Extending an E-mail script <jast@ms.com>
Re: Kudos to Tom Christiansen and problems with OO <seay@absyss.fr>
Re: Learning Perl (David Alan Black)
Re: Learning Perl (Mike Heins)
link between C and PERL <bchrist@cme.nist.gov>
Re: list directory files in order of creation. (Bennett Todd)
Re: Need to hack RCS files (Brendan O'Dea)
Re: Newbie question (very stupid question I suppose) (Tad McClellan)
Re: Newbie question (very stupid question I suppose) sikke600@hio.tem.nhl.nl
Re: Perl basics <minaret@sprynet.com>
Re: Perl Compile Problem LC_TYPE <seay@absyss.fr>
Re: Question Of Leading \n From Join Function. (Andrew M. Langmead)
Re: Reply to Ousterhout's reply (was Re: Ousterhout and lvirden@cas.org
Re: Reply to Ousterhout's reply (was Re: Ousterhout and <prasadm@not4u.polaroid.com>
Re: Reply to Ousterhout's reply (was Re: Ousterhout and lvirden@cas.org
Re: Reply to Ousterhout's reply (was Re: Ousterhout and <seay@absyss.fr>
Running Perl script w/i Unix Shell Script (David Tucker)
Re: security without a secure server (Mike Stok)
Re: Stupid questions. (Erik Braun)
Use Variable in Shell <pircher@informatik.tu-muenchen.de>
Warning! E-mail bombs posted by Michael Kagalenko <mdkersey@hal-pc.org>
Warning: Michael Kagalenko post has imbedded JavaScript <mdkersey@hal-pc.org>
Re: Who makes more $$ - Windows vs. Unix programmers? (Michael D. Bray)
Re: Why are no elements returned from split(/X/,'')? (David Alan Black)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 10 Apr 1997 11:17:24 GMT
From: jbroeks@cs.vu.nl (Broekstra J)
Subject: Re: 5.003 Fails compiling...
Message-Id: <5iii84$t4p@star.cs.vu.nl>
Stephen Cole (scoler@earthlink.net) wrote:
: I'm experiencing a problem upgrading my Perl 5.00m to the 5.003. I've
: tried looking through the FAQs & also a search through www.dejanews.com
: but all I found were a bunch of people bombing out at the same place
: but a different error.
:
: Anyways, here's the deal:
:
: 1.) sh Configure works fine (accepting all defaults)
: 2.) While running "make", the following error appears:
:
: rm -f libperl.a
: ar rcv libperl.a perl.o gv.o toke.o perly.o ap.o regcomp.o dump.o
: util.o mg.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o
: pp_sys.o doop.o doio.o reg exec.o taint.o deb.o globals.o
:
: cc -L/usr/local/lib -o miniperl miniperlmain.o libperl.a -lgdbm -ldb
: -ldl -lm -lc
:
: ld: cannot open -ldl: no such file or directory
: make: *** [miniperl] Error 1
:
: Apprently I'm missing something but what the hell is "dl"??
I've had this same problem. The trouble is that in the /lib directory there
is a library libdl.so.1.17.x (dunno the exact numbers), but no libdl.so.
So the compiler doesn't recognize it. You could change this two ways:
1. let the compiler know number extensions are also possible.
2. make a softlink in the /lib directory, like this:
$ ln -s libdl.so.1.17.x libdl.so
I chose the last option. It may not be elegant, but It Works(tm)!
HTH.
Cheers,
J1
---------------------------------------------------------------------------
J1 Broekstra
"It's sad that, in our blindness, jbroeks@cs.vu.nl
we gather thorns for flowers." http://www.cs.vu.nl/~jbroeks/
------------------------------
Date: 10 Apr 1997 10:59:51 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: arrg
Message-Id: <5iih77$euk@pirate.shu.edu>
Hello -
"Darrell" <darrell@rapidnet.net> writes:
>You're both wrong, it should be like this:
>@eachrec = split(/##/, @wholething);
But you're splitting a list instead of a string - well, actually,
it is a string, consisting of the size of @wholething, because
you're evaluating @wholething in a scalar context.
So if @wholething has 10 elements, $eachrec[0] will be "10".
Probably not what's wanted.
Dan Boorstein's:
@eachrec = split(/##/, $wholething[0]);
looked pretty good to me.
David Black
dblack@icarus.shu.edu
------------------------------
Date: 10 Apr 1997 13:56:36 GMT
From: jhardy@cins.com (John Hardy)
Subject: can it be done
Message-Id: <5iirik$ggm$1@news>
Keywords: perl
Thanks Tad McClellan for the help you gave me on my script.
I really appreciate it.
John
------------------------------
Date: Wed, 9 Apr 1997 22:06:46 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: CGI programming HELP!!!!!
Message-Id: <6glhi5.cmi.ln@localhost>
Smith/Bean ("smithpr@gte.net"@gte.net) wrote:
^^^^^^^^^^^^^^^^^^^^^^^^
: My question is do you have to compile the CGI or can you just write it
: and use it to sort information?
CGI is an interface. You don't compile an interface...
Whether you need to compile your CGI program depends on what language you
choose to write your CGI program with.
Since you posted to the Perl newsgroup, I assume you choose to use Perl.
So the answer is: No
: Please someone help and email me back
^^^^^^^^^^^^^
Very funny.
You don't have a valid email address...
: HHHHHHEEEEEEEELLLLLLLPPPPPPPP!!!!
HHHHiiiirrrreeee a consultant.
: I really need to know!!
<g>
1) Perl != CGI
2) post CGI questions to the CGI newsgroup:
comp.infosystems.www.authoring.cgi
Don't post CGI questions to the perl newsgroup.
Post Perl/perl questions to the perl newsgroup.
3) Perl != CGI
4) see these FAQs mentioned in the perl FAQ part 9:
http://www.perl.com/perl/faq/idiots-guide.html
http://www3.pair.com/webthing/docs/cgi/faqs/cgifaq.shtml
http://www.perl.com/perl/faq/perl-cgi-faq.html
http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
http://www.boutell.com/faq/
5) Perl != CGI
: Thanks
Uh huh.
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Thu, 10 Apr 1997 09:12:09 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: CGI programming HELP!!!!!
Message-Id: <pudge-ya02408000R1004970912090001@nntp.noc.netcom.com>
In article <6glhi5.cmi.ln@localhost>, tadmc@flash.net (Tad McClellan) wrote:
#Smith/Bean ("smithpr@gte.net"@gte.net) wrote:
# ^^^^^^^^^^^^^^^^^^^^^^^^
#: Please someone help and email me back
# ^^^^^^^^^^^^^
#Very funny.
#
#You don't have a valid email address...
How do you figure? It is RFC-822 compliant. Any ASCII character
(including an escaped ") is allowed inside quotes in the first part of the
address.
#================================================================
I will finish what I sta
--Bart Simpson
Chris Nandor pudge@pobox.com
PGP Key 1024/B76E72AD http://pudge.net/
Keyfingerprint = 08 24 09 0B CE 73 CA 10 1F F7 7F 13 81 80 B6 B6
------------------------------
Date: 10 Apr 1997 11:26:36 GMT
From: dougyoung@zap.wwdc.com (Douglas Young)
Subject: Re: DBM problem
Message-Id: <5iiipc$i22@van1s03.cyberion.com>
Daniel Sundin (daniel.sundin@engelholm.se) 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, all I get in $foo is a pointer to a hash,
: and I cant dereference it, get the values :(
It doesn't work that way. dmb is not that kind of girl :)
$DB{$foo} = "Daniel:BOX 1221"; # or use | forthe separator
The to Retrieve it
($Name,$address)=split(/:/,$DB{$foo});
-----------------------------------------------------------------------------
Douglas Young Senior System Administrator
dougyoung@wwdc.com Worldwide Data Communications
div of Cyberion Networking Corporation.
------------------------------
Date: Thu, 10 Apr 1997 10:28:08 -0400
From: Peter Jastreboff <jast@ms.com>
Subject: Help! Extending an E-mail script
Message-Id: <334CF8F8.41C67EA6@ms.com>
Hello,
I have to build a program which grabs an e-mail send to a E-mail ID
(like: E-mail ID@abc.com) then sorts the mails by several criteria ie.
Date, Name, Subject. So the end result would be a group sorted by
(lets say) Name then Date then by Subject. I need to be able to post
these mails to a HTML page for viewing.
I looked around already and found a fine script written by Tom. Thanks
Tom!! However, I have my doubts that it may be able to handle lots of
emails a day(say 20-30 messages). The post is called "splitting and
reading data in an elm mailbox". Just one other thing, The entire
system is MainFrame based and most people run E=MC2 mail programs.
Thanks So Much!
Hut III
------------------------------
Date: Thu, 10 Apr 1997 16:39:06 +0100
From: Douglas Seay <seay@absyss.fr>
To: Luca Passani <lpa@sysdeco.no>
Subject: Re: Kudos to Tom Christiansen and problems with OO
Message-Id: <334D099A.4395@absyss.fr>
[posted and mailed]
Luca Passani wrote:
>
> I think you are wrong.
>
> Chris Nandor wrote:
>
> > I apologize on behalf of everyone here (except Tom) for not GIVING OUR > FREE TIME TO YOU.
>
> first off, this is a newsgroup, and the whole point of a newsgroup is
> that I give one hour of my time and use one thousand hours offered by
> one thousand partecipants.
While that is true of common folk like me, I doubt if TomC gets his
thousand hours for each hour he spends. I am not even sure that he gets
one hour for each thousand hours he spends.
> > While I understand your frustration, it sounds as though you feel it is the
> > obligation of people here to help you. That is a bit presumptuous.
>
> it's not compulsory for you as a single to give an answer, but the
> newsgroup as a whole has some kind of obligation to answer *legitimate*
> questions.
Nope, that is groupthink. c.l.p.m is a collection of individuals. That
no one individual decided to help you says nothing of the others. By
reading this group we make no claims to usefulness. Just if someone
sees something that they think that they can answer correctly, they
reply. No promises, just friends helping friends.
> I can't understand why CGI question get answers like "this is the wrong
> group and this is the answer", while mine, purely about perl OO features
> I am trying to learn, was left unattended for days when anyone a little
> bit more knowledgable than me could have found the answer with a single
> look.
I don't remember seeing your post. I can't tell you why I didn't
answer. Maybe I had a busy day and your subject didn't look interesting
enough. Dunno.
> > But furthermore, Tom is generally considered to be one of the top three
> > experts of Perl. If he answers you, why should any of us bother?
>
> because the answer was not on the group, but by Email after I solicited
> Tom personally (that's why I posted the answer). I did that because a
> vague answer I had received did not clarify my situation at all.
> It was not nice to involve Tom, who already does a lot for everybody
> here, and I am embarassed to admit that I had to get in contact with him
> privately. On the other hand I think the newsgroup sort of misbehaved.
It is so nice of you to set standards of conduct for the rest of us.
> > Glad you got the help you needed,
>
> me too.
As a sometime responder, I hope that you, and everyone else with a valid
question, gets an answer reasonably quickly (within a week). But since
most of us do something other than just read news and reply, you will
have to forgive the occasional lapse. Even with unfortunate cases such
as yours, I doubt if a professional service has such good response time.
- doug
------------------------------
Date: 10 Apr 1997 11:39:09 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Learning Perl
Message-Id: <5iijgt$gjt@pirate.shu.edu>
Tom Christiansen <tchrist@mox.perl.com> writes:
> [courtesy cc of this posting sent to cited author via email]
>In comp.lang.perl.misc,
> Randal Schwartz <merlyn@stonehenge.com> writes:
>:just read from the beginning
>:until you're tired of reading. Repeat as necessary.
>Day 1: read chapters 1 and 2; get tired.
>Day 2: read chapters 1 and 2; get tired.
>Day 3: read chapters 1 and 2; get tired.
>Day 4: read chapters 1 and 2; get tired.
>This reminds me of how people try to learn to play a new piano
>piece: they never get to the end. :-)
Maybe Randal's instruction language supports closures and/or
tail recursion. :-)
David Black
dblack@icarus.shu.edu
------------------------------
Date: 10 Apr 1997 14:31:38 GMT
From: mikeh@iac.net (Mike Heins)
Subject: Re: Learning Perl
Message-Id: <5iitka$oj0$1@ocoee.iac.net>
Tom Christiansen (tchrist@mox.perl.com) wrote:
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc,
> Randal Schwartz <merlyn@stonehenge.com> writes:
> :just read from the beginning
> :until you're tired of reading. Repeat as necessary.
>
> Day 1: read chapters 1 and 2; get tired.
> Day 2: read chapters 1 and 2; get tired.
> Day 3: read chapters 1 and 2; get tired.
> Day 4: read chapters 1 and 2; get tired.
>
> This reminds me of how people try to learn to play a new piano
> piece: they never get to the end. :-)
>
Some people have 20 years of experience -- some have one year of
experience 20 times over. 8-)
--
Mike Heins ___ ___
Internet Robotics |_ _|____ |_ _|
My wife is great. She doesn't 131 Willow Lane, Floor 2 | || _ \ | |
care where I go, just as long as I Oxford, OH 45056 | || |_) || |
don't have any fun. |___| _ <|___|
-- Lee Trevino mikeh@iac.net 513.523.7621 |_| \_\
------------------------------
Date: Thu, 10 Apr 1997 09:58:08 -0400
From: Bochenek Christophe <bchrist@cme.nist.gov>
Subject: link between C and PERL
Message-Id: <334CF1EF.41C67EA6@cme.nist.gov>
Hi,
I have managed to make a perl program run by an other one, but I would
like to make a C program run by a perl program.
I have tried a very basic example:
#! /usr/local/bin/perl
$prg='essai.c';
print "everybody ".`$prg`."\n";
My C program just prints: hello
#include "stdio.h"
main()
{
printf("hello\n");
}
Then this error message appears:
web% perl hello.cgi
.//essai.c: syntax error at line 5: `printf' unexpected
everybody
------------------------------
Date: 10 Apr 1997 13:01:30 GMT
From: bet@rahul.net (Bennett Todd)
Subject: Re: list directory files in order of creation.
Message-Id: <slrn5kpp59.d3l.bet@waltz.rahul.net>
On Wed, 09 Apr 1997 22:11:31 GMT, Tim Gim Yee <tgy@chocobo.org> wrote:
>opendir DIR, '.' or die "Couldn't open current dir: $!";
>@files = sort {-M $a <=> -M $b} readdir DIR;
If that should turn out to run too slowly for your tastes, you can then speed
it up with the Schwartzian Transform
@files = map { $_->[0] }
sort { $a->[1] <=> $b->[1] }
map { [ $_, -M ] } readdir DIR;
which invokes the (expensive) stat(2) syscall once per file, saving the
results, rather than twice per comparison.
See tchrist's tutorial on sorting, available from either of
<URL:http://perl.org/CPAN/doc/FMTEYEWTK/sort.html>
<URL:http://perl.com/CPAN/doc/FMTEYEWTK/sort.html>
-Bennett
------------------------------
Date: 10 Apr 1997 10:41:37 GMT
From: bod@compusol.com.au (Brendan O'Dea)
Subject: Re: Need to hack RCS files
Message-Id: <5iig51$5md$1@diablo.compusol.com.au>
[mailed & posted]
In article <334c7796.7201491@news.airmail.net>,
Kevin Cline <clines@airmail.net> wrote:
>I want to be able to fill in missing RCS functionality, like changing the log
>message for a revision. I want a perl module that will parse an RCS file
>creating some perl objects, allow modification of those objects, then
>overwrite the RCS file. Maybe it would be easier to just hack the RCS source
>code, but I'm not sure.
Changing the log message for a revision? You might try ``man rcs''
for a start:
-mrev:msg
Replace revision rev's log message with msg.
As to your other requirements, it is possible that a wrapper such as
CVS may already have what you require.
The module list has a VCS::RCS entry (RJRAY), although sadly it is
only a place-holder (i) at this time.
If your RCS files are not massive, this snippet will build an
associative array of the components of an RCS file (man 5 rcsfile)
which has been slurped into $_ .
The result is such that (for example) $rcsfile{$rcsfile{'head'}}{'text'}
contains the text of the current revision (although any @ characters
will still be doubled).
Error checking is left as an excercise to the reader, as is actually
doing something useful with the data <g>.
----snip----
# Token splitting based on Jeffrey's CSV example on p208 of Hip Owls
my @tokens = ();
push @tokens, $+ while m{
\@ ( [^\@]*(?:\@\@[^\@]*)* ) \@ \s*
| ( [^\@\s;]+ ) \s*
| ( ; ) \s*
}gx;
my %rcsfile = ();
my $hash = \%rcsfile;
# Process tokens
while (@tokens)
{
my $k = shift @tokens;
# Handle special cases w/- trailing ';' first:
# ... revision
if ($k =~ /^\d+\.\d+(?:\.\d+\.\d+)*$/)
{
$hash = \%{$rcsfile{$k}};
next;
}
# ... desc
if ($k eq 'desc')
{
$rcsfile{'desc'} = shift @tokens;
next;
}
# ... log/text
if ($k eq 'log' or $k eq 'text')
{
$hash->{$k} = shift @tokens;
next;
}
# Everything else is a semi-colon terminated list
my ($t, @values) = ();
while (defined ($t = shift @tokens) and $t ne ';')
{
push @values, $t;
}
# Known single or boolean keys
if ($k eq 'head' or
$k eq 'branch' or
$k eq 'strict' or
$k eq 'comment' or
$k eq 'expand' or
$k eq 'date' or
$k eq 'author' or
$k eq 'state' or
$k eq 'next')
{
$hash->{$k} = shift @values || 1;
}
# List valued keys (or post v5.7 keywords)
else
{
$hash->{$k} = \@values if @values;
}
}
----snip----
Regards,
--
Brendan O'Dea bod@compusol.com.au
Compusol Pty. Limited (NSW, Australia) +61 2 9809 0133
------------------------------
Date: Thu, 10 Apr 1997 06:30:52 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Newbie question (very stupid question I suppose)
Message-Id: <c1jii5.lr.ln@localhost>
sikke600@hio.tem.nhl.nl wrote:
: Hi,
: I am new to perl and I have a question:
: I have this little counter program for my homepage, but everyone can use
: it. I want to use it for one page only. How can I check that a variable
: does not equal a given string?
^^^^^^^^^
Searching for 'not equal' in the free documentation included with
the perl distribution finds the answer to this question in 15 *seconds*.
So I'd have to say that it is a wasteful, as well as a stupid, question...
: Thank you!
Uh huh.
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Thu, 10 Apr 1997 08:11:52 -0600
From: sikke600@hio.tem.nhl.nl
Subject: Re: Newbie question (very stupid question I suppose)
Message-Id: <860677227.3624@dejanews.com>
In article <860661490.29251@dejanews.com>,
sikke600@hio.tem.nhl.nl wrote:
<snip>
Thanks to everyone who answered to my query. I had checked www.perl.com
for the kind of documentation, but I couldn't find what I needed until
after I posted my previous message.
I'm sorry for causing the inconvenience.
(btw, the counter now works like I want it to ;-) )
Thanks again!
Andreas Sikkema
sikke@hio.tem.nhl.nl
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 10 Apr 1997 14:00:05 GMT
From: "Geoff Mottram" <minaret@sprynet.com>
Subject: Re: Perl basics
Message-Id: <01bc45b7$5e783840$966cafce@cactus>
> I've a perl program and my web serber can run it...I'd like to know if
I
> need to compile this program to run it. And if I need, How I do this ?
Since your web server can run your Perl script, you are all set.
Geoff Mottram
minaret@sprynet.com
------------------------------
Date: Thu, 10 Apr 1997 15:32:40 +0100
From: Douglas Seay <seay@absyss.fr>
To: Yongyan Wang <ywang@news>
Subject: Re: Perl Compile Problem LC_TYPE
Message-Id: <334CFA08.6793@absyss.fr>
Yongyan Wang wrote:
>
> What are the right values for LC_ALL, LC_CTYPE, and LANG, when
> compiling the perl5.003.
Depends on your preference for languages. As I like the US variant of
the english language and the default "C" gets US style values, I use
export LC_ALL=C
and so on. Some of my coworkers chose french values. It depends on
what you want.
- doug
------------------------------
Date: Thu, 10 Apr 1997 13:15:23 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Question Of Leading \n From Join Function.
Message-Id: <E8FBHn.3Fz@world.std.com>
[a copy of this article was sent to the author of the referenced message.]
dharma@msys.net (Rhadji P) writes:
>I've noticed the following sequence:
>@list ='';
>push(@list,val1,val2,val3,...valn);
>$array{key} = join("\n",@list);
>Results in:
>$array{key} = \nval1\nval2\nval3\n...\nvaln
>What is generating the leading \n?
The '' that you put in the list at the first line of code. Take a look
at @list in the debugger.
Enter h or `h h' for help.
main::(push:1): @list ='';
DB<1> n
main::(push:2): push(@list,qw(val1 val2 val3 valn));
DB<1> x @list
0 ''
DB<2> n
main::(push:3): $array{key} = join("\n",@list);
DB<2> x @list
0 ''
1 'val1'
2 'val2'
3 'val3'
4 'valn'
DB<3>
I'm not quite sure where your misunderstanding is. Either you are
confusing "@list=''" with "undef(@list)" (assigning one element to a
list instead of getting rid of it entirely.) or you are confusing
"push @list, val1, val2, val3" with "@list = (val1, val2, val3)"
(Using push to assign to a list, not realizing that it is appending
elements to an existing list.)
--
Andrew Langmead
------------------------------
Date: 10 Apr 1997 12:04:33 GMT
From: lvirden@cas.org
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <5iil0h$hhp@srv13s4.cas.org>
According to Graham Matthews <graham.matthews@maths.anu.edu.au>:
:> want to know the truth, I think you need to stop making superficial excuses
:> and ask deeper semantic questions. There really is something better about
:> each of these "ugly languages" that gives them an advantage over the "good"
:> languages; I'll leave it up to you to figure out what it is.
:
:So far I have yet to see something better about these "ugly languages".
:As far as I can see people have quite effectively rebutted all the
:points you made in your white paper, and subsequently on newsnet. For
:example you mentioned how concise Tcl code was to interface to Tk. But
:then someone posted a more concise piece of TkGofer code that did the
:same thing. etc etc etc
What kind of 'good' are we talking about? An intrinsic moral, ethical, or
technical superiority? Or is 'good' being defined as 'that undefinable
quality to results in a programming language being used by large numbers
of programmers, for large numbers of tasks'? Or is there some other
definition being battered about here?
I see nothing morally, ethically or technically superior about Tcl, Perl,
C, C++, or for that matter LISP, Scheme, Eiffel, etc.
If we are talking about the aspects of a language that result in it being
used for large numbers of tasks, of course one has to define what large
is and in relationship to what other languages.
I suspect there are many more IBM MVS JCL 'scripts' than there are programs
in any other scripting language. I suspect Visual Basic programs
make up the largest number of programs on MS-DOS/Intel machines - which is
supposedly the largest installed platform of computers.
C , COBOL, or FORTRAN may be the 'high level' languages with the most programs.
Are Visual Basic/Visual C/Visual C++ the most popular languages under
MS-DOS because of their technical superiority, their cost, their manufacturer,
their relationship to the owner of their OS?
--
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: Thu, 10 Apr 1997 08:00:37 -0400
From: "M. Prasad" <prasadm@not4u.polaroid.com>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <334CD665.186E@not4u.polaroid.com>
cosc19z5@bayou.uh.edu wrote:
> Let's see, C became popular for one reason only -- it was almost
> mandatory for programming under Unix which was widespread (and
When C became popular, the other major choices were Pascal, Fortran,
Basic, and at some places, Lisp. Pascal suffered from numerous
problems for writing large programs. All of these problems
were solved by the compiler vendors, but you had to learn the
particular solutions for each compiler you had to use. Fortran was
ok, but typos were a big nuiscance, and at the time it wasn't
structured. Basic was not useful for serious programming.
Lisp at the time was not very useful for systems
programming, and no standards existed. Smalltalk was
not available and when available was unusably slow.
So the rise of C happened because it was the best
language available for practical reasons. It may
have had something to with Unix, but this doesn't
explain why it also became the language of choice
on systems such as VAX/VMS (where the vendor was
actively pushing a language called Bliss for all systems
programming.)
A similar pheonomenon occurred in the PC world, which was
taken over by C. This was quite a surprising occurence for
the PC world. In early 80's, BYTE magazine covered
all languages it thought would be useful for the PC.
Smalltalk was deemed so important that it later on got
an article all to itself. C, somehow or the other,
didn't quite make it in the list of BYTE's languages.
The clear winner according to BYTE magazine was Pascal.
Yet by late 80's, most of PC programming had moved from
Pascal, Assembly and Basic to C and C++. The primary
reasons may have been the ability to do hardware manipulation
and memory accesses directly from C, thus saving the
programmer from having to use Assembly when speed was
not a concern.
So hype or the lack of it doesn't quite do it. People
choose languages for their own very sane reasons. Arguing
abilities and debating tricks of adherents have not proven
to be very effective, otherwise Lisp would be the most
widely used language today. It's not as if multi-million
dollar companies did not exist at one time to promote
Lisp. It's also not as if they lacked promotional
abilities or dedicated champions.
------------------------------
Date: 10 Apr 1997 12:17:20 GMT
From: lvirden@cas.org
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <5iilog$kd1@srv13s4.cas.org>
:> As for Tcl, it's there for one reason and one reason only -- strong
:> corporate backing. We've got a powerful company that wants to
The only strong corporate backing that I have seen has been from the
corporations using Tcl as a part of their products. Well, Sun continues
to pay the Tcl/Tk development team's salary, and for a couple of weeks
put 5 or 6 web pages up on their main corporate web site. That's been,
to date, about the extent of Sun's backing.
:> make a quick buck and therefore is using its clout to force
I don't know too many corporations still around who are only interested
in a slow buck. Got to some how pay those high salaried engineers,
the electricity for their computers, etc.
:> Tcl down our throats. This is the same tactic used by charlatans
Wow! I really feel for you. I myself typically have quite a tough time
finding a Sun employee other than the Tcl team itself who has even heard
much of Tcl - you have them coming to your office and force feeding the
language to you!
:> like Micro$oft. Indeed that's the only possible explanation
:> as to why a glorified text preprocessor would even get a second
:> look -- that and the fact that it is riding on the coattails
:> of Tk.
Hmm - seems like lots of folk have given that text preprocessor more than
just a second look. It's so sad to see techie cults like comp.lang.tcl
continue unchecked.
--
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: Thu, 10 Apr 1997 14:43:15 +0100
From: Douglas Seay <seay@absyss.fr>
To: Erik Naggum <erik@naggum.no>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <334CEE73.29B7@absyss.fr>
[posted and mailed]
Erik Naggum wrote:
>
> * John Ousterhout
> | 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.
>
> yeah, this is a _really_ ingenious argument. let's look at the operating
> word here, "could". how do people choose languages? do they pick them out
> of the blue? or do they pick languages according to hype, marketing,
> availability, perceived proximity to known languages, etc? it should be
> pretty darn obvious that they don't choose languages they don't "know".
> C++ won because it was "a better C", then, as people got more into it, it
> grew to become a behemoth of a language. perl was a cute little thing that
> combined several of the silly little Unix languages into one language and
> added a few cute improvements. then it got cancer and grew to become an
> enormous _implementation_ of a largely unspecified language, just like its
> predecessors. now, tcl is not really language, either, just as the Bourne
> shell, awk, sed, etc, are not languages. they are just tools in a toolbox.
> languages have more than one implementation. perl doesn't. does Tcl?
If I understand you correctly, you are saying that the definition of a
language (as opposed to a tool) is multiple implementations? If I sat
down and wrote a new implementation of Perl or Tcl from scratch, then
these two "tools" would become "languages"? Since gawk is a superset of
awk and was written from scratch, does this mean that awk is now a
language and gawk is half-language, half-tool?
I'll agree that they aren't ivory tower languages, and that the language
specification may have been created hand-in-hand with the tool, but I
don't see how that makes them less of "languages". This m ight be
ancient history, but was there a formal specification of COBOL, FORTRAN
or APL before the first implementation?]
But the first part of your paragraph is correct. People often do chose
languages for reasons other than "which is best for this task". Some
important items that you overlook are support and complimentary tools
(debuggers, code generators, etc), and ocassionally cost.
> the Distinguished Professor of Computer Science has turned into a Marketing
> Droid. how incredibly sad.
Oh no, he sold out! Traitor! Don't you just hate it when the
underground groups go mainstream? It ruins everything. I'll never buy
one of his albums again!
> | 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.
>
> | There really is something better about each of these "ugly languages"
> | that gives them an advantage over the "good" languages; I'll leave it up
> | to you to figure out what it is.
>
> one word: novelty. for some reason, immature people prefer a new language
> over an existing language when they are presented with one new and one old.
I'm not sure that I agree with this. Am I immature for chosing "new"
Perl over "old" C? The same for deciding to use "new" perl instead of
"newer" Python? I have yet to see a language that lets me do what I
want more easily than Perl. Should I chose lisp as my text formatting
language of choice because it is "good" and not "ugly"? Maybe SmallTalk
instead? Maybe I don't have an ivory tower view of languages.
> unformed people delight in the gaudy and in novelty.
> cooked people delight in the ordinary.
But aren't "ugly" languages like Perl, VB, C++ and Tcl more "ordinary"
than the "good" languages Lisp, Scheme, and Smalltalk? How do you
define "ordinary"? I would say that procedural languages are more
"ordinary" than functional or OO languages. Does "ordinary" means
"often used? Although I dislike VB, I'd bet that there is as much
working code in VB as in the whole lisp family of languages. Yes, this
is just a gut feeling, I have no numbers to back it up.
I'll admit that I'm being a bit of the devil's advocate here because I
don't like several of the "ugly" languages here. I certainaly don't use
Tcl and I don't think I'm likely to ever use it if I have an
alternative. But that doesn't mean I like Ivory Tower attacks on
practical languages. Tcl was made to do something specific, namely glue
together executables. In this domain, it does its job.
> I'm no longer young enough to know everything.
funny sig.
- doug
PS - The syntax of perl5 is actually simplier than perl4. The thing
that got bigger was the libraries. But since it is no longer "cute", I
couldn't expect you to keep up with it.
------------------------------
Date: 10 Apr 1997 13:29:51 GMT
From: david@temss2.main.temple.edu (David Tucker)
Subject: Running Perl script w/i Unix Shell Script
Message-Id: <5iiq0f$d0a@cronkite.ocis.temple.edu>
Can you run a perl script within a UNIX shell script without having
to preface all Perl variables starting with a $ i.e. $a with
a backslash i.e. \$a.
Otherwise, the UNIX shell will interpret the variable within the
shell context and give a "Variable syntax" error.
Thanks in advance.
------------------------------
Date: 10 Apr 1997 12:32:39 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: security without a secure server
Message-Id: <5iiml7$46f@news-central.tiac.net>
Keywords: security secure
In article <lcole.860604234@shellx>, Len Coleman <lcole@best.com> wrote:
>Can a Perl script provide a reasonable level of security for credit card
>transactions without the protection of a secure server?
>
>In non-Web transactions, we do not ask for secuity with most credit card
>use. Are the risks greater for credit card abuse/theft in Web transactions?
>Where are the actual dangers in credit card processing, and how can those
>dangers be reduced by good scripts?
>
>While the best answer may be a secure server, that option may not be possible
>for low volume startups. Can Perl help?
The thing most people seem concerned about is the transmission of a
recognisable name, card number and expiry date in the clear over the
internet, so sending that information in a piece of mail or a news article
would provide "interesting" material for something sniffing packets on a
network. Once the data has arrived at the server then good programming
(in any language) and process can be used to reduce the risk of
unauthorised access to credit card information. At the very least some
kind of encryption should be used if the data ever ends up backed up onto
tape ... the best OS security won't stop people walking off with a tape
and reading it on their PC at home. Good security begins with a sound
policy and is virtually impossible to implement piecemeal after the fact.
The implementation language is really of little consequence, Perl does
have the tainting mechanism which can help you make sure you check data
from "untrustworthy" sources, but that is probablky a different dimension
of security from that you're worrying about in this message.
But, back to the web question...
The web, which gives instant gratification and has pretty pictures, is a
much more seductive place to ask for credit card info, so for the aspiring
data thief gathering data by sniffing packets on the network, checking
those destined for port 80 on a web server (as well as port 25 on a mail
host) might reduce the volume that had to be examined. One way to protect
the data is to use encryprion on the link from the browser to the server,
and that's what SSL (with reasonable length keys) is meant to do. For a
small start up it's possible to get the (free) apache web server and get a
free SSL implementation and get a company like Thawte
(http://www.thawte.com/) to sign a certificate which lets Microsoft &
Netscape browsers have confidence in your secure server. The certificate
is only issued after the Certificate Authority has confirmed to some
degree that you are who you claim to be, and Thawte charge (I think) $100
for a certificate.
Hope this helps,
Mike
(sorry for the lack of perl content - you can use mod_perl with apache
1.1.3 and SSLeay to have a secure server with fast CGI...)
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
------------------------------
Date: 10 Apr 1997 12:42:21 GMT
From: erik@paxp01.mipool.uni-jena.de (Erik Braun)
Subject: Re: Stupid questions.
Message-Id: <slrn45kpo1c.3q9.erik@paxp01.mipool.uni-jena.de>
On Thu, 10 Apr 1997 13:17:38 +0200, Magnus Holmberg <pucko@lysator.liu.se> wrote:
>I've got a mail from someone that thinks that I have asked many stupid
>questions and thinks that I should RTFM before I ask some more
>questions.
>I wounder if someone knows a newsgrop for perl-beginners where I can ask
>my "stupid" questions whithout disturbin all experts hear?
And who should answer your questions there? The other Perl-Beginners?
Just read <a href="http://www.perl.com/perl/faq/index.html">THE PERL FAQ</a>
and you won't ask "stupid" questions anymore.
good luck,
erik
--
erik@minet.uni-jena.de
------------------------------
Date: Thu, 10 Apr 1997 16:49:36 +0200
From: Alex `Taker` Pircher <pircher@informatik.tu-muenchen.de>
Subject: Use Variable in Shell
Message-Id: <334CFE00.5405@informatik.tu-muenchen.de>
I Have an CGI which starts first a shell-script and in the shell-script
it run's the following Perl-program:
-------------------
#!/usr/local/dist/bin/perl
# Get the input
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
# Split the name-value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
# Un-Webify plus signs and %-encoding
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g;
$value =~ s/<([^>]|\n)*>//g;
$FORM{$name} = $value;
}
#get variables
if ($FORM{'what'}) {
$thisisit = "$FORM{'what'}";
$thisisit =~ s/\&//g;
}
$ENV{"PERLVARIABLE"}=$thisisit;
------------
Then I want to use the Variable 'PERLVARIABLE' generated in the
Perl-Program. BUT if I do a 'set' in the shell-script I can't see
this Variable.
Anyone knows what I have to do, to use it in the shell-script?
THX
Taker
------------------------------
Date: Thu, 10 Apr 1997 07:59:37 -0400
From: "Michael D. Kersey" <mdkersey@hal-pc.org>
Subject: Warning! E-mail bombs posted by Michael Kagalenko
Message-Id: <334CD629.5094@hal-pc.org>
The poster identified as
mkagalen@lynx.dac.neu.edu (Michael Kagalenko)
has posted a missive with a JavaScript bomb that will attempt to open
100 windows displaying a can of Spam( and creating the sound "Spam" ) if
you have JavaScript enabled. You may safely read his/her posts provided
you first disable JavaScript.
However, there may also be a need to disable Java, since the archives
indicate that this same poster has caused similar problems in another
newsgroup,
rec.arts.books
where (s)he has apparently posted similar messages. Visit the Dejanews
archives at
http://www.dejanews.com/
and look up
mkagalen@lynx.dac.neu.edu
for details.
Good Luck,
Michael D. Kersey
------------------------------
Date: Thu, 10 Apr 1997 07:37:46 -0400
From: "Michael D. Kersey" <mdkersey@hal-pc.org>
Subject: Warning: Michael Kagalenko post has imbedded JavaScript SPAM bomb!
Message-Id: <334CD10A.2208@hal-pc.org>
Michael Kagalenko wrote:
>
Warning to Netscape users!!
The above poster, Michael Kagalenko, has inserted the following
JavaScript code in his e-mail:
<script language=javascript><!--
for(j=0;j<100;j++)
{window.open("http://www.rowan.edu/~hess/spam.gif",""+j,"toolbar=no,directories=no,menubar=no")}
//--></script><bgsound="http://www.rowan.edu/~hess/spam.wav" loop="yes">
This will open windows in your browser until memory is exhausted and/or
your system hangs.
The .gif file is of a can of Spam(very humorous) and the .wav file is a
ludicrous imitation of Tweety Bird saying "Spam!".
I REALLY wish you wouldn't do this sort of thing, Michael Kagalenko.
Michael D. Kersey
------------------------------
Date: 10 Apr 1997 13:30:04 GMT
From: mike@skynet.oir.ucf.edu (Michael D. Bray)
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <slrn5kpqmm.aa7.mike@skynet.oir.ucf.edu>
On Wed, 09 Apr 1997 10:13:00 -0700, Jacob Bailly <jnb@thunderstorm.com> wrote:
] > > Unix is what it is ... a ``UNIfied eXecutive'' -- an so it should
] > > be understood ... Amen! But if you wish, go fondeling your FAQ ...
] , your silly insistence that UNIX stands for ``UNIfied eXecutive'' (ha
] ha)
] > doesn't make it so.
] >
] > The fact that UNIX is a pun on Multics is no urban legend, but a simple
] > historic fact. If you don't believe Lawrence Kirby, please write mail to
] > Brian Kernighan.
]
] Agreed.
] To me the phrase "Unified Executive" doesn't really even mean
] anything.... It certainly doesn't make me think "Oh! Of course! A
] logical name to describe an operating system by!" On the contrary, I
] can't quite understand what "unified executive" means in relation to
] operating systems.... But the real point is that it is indeed fact that
] the name UNIX WAS derived from Multics. Historical fact.
Guys... isn't it at all possible that both are true? Whether or not one
or the other is true has nothing to do with the other. I've seen plenty
of acronyms which were obviously thought up first, and then they decided
what it should stand for. So UNIX was derived from Multics... then someone
said "That *could* stand for UNIfied eXecutive" and thus the FAQs were
born.
--
( Michael D. Bray | 'I know engineers, they love to change things.' )
( mike@oir.ucf.edu | ~ Bones McCoy )
(-----------------------|--------------------------------------------------)
( GO MAGIC!!! | http://skynet.oir.ucf.edu/~mike | Peace )
------------------------------
Date: 10 Apr 1997 11:34:58 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Why are no elements returned from split(/X/,'')?
Message-Id: <5iij92$ge8@pirate.shu.edu>
Hello -
dave@fast.thomases.com (Dave Thomas) writes:
>On 09 Apr 1997 14:35:09 -0500, Kent S. Gordon wrote:
>> Why are no elements returned from split(/X/,'')?
>> given the below perl script
>> $blank_string='';
>> $non_blank_string=' ';
>> @foo= ( '' );
>> print "NUMBER of FOO's: ",$#foo, "\n";
>But what does $#foo mean?
>Its the subscript of the last elements -- one less than the number of
>entries for zero-based arrays...
But still - if this results in a one-element array:
@foo = '';
then one could understandably expect a function which returns the
original string, where the original string eq '', also to result
in a one-element array:
@foo = split (//, '');
But it doesn't.
I think we're seeing the difference between defined and undefined
null values, since even this:
@list = $uninitialized_scalar;
print $#list;
prints 0 rather than -1. But I'm not actually sure why the
split() call doesn't behave like an assignment of '' to an
array. That means that this:
@foo = "def";
must somehow be different (though invisibly) from this:
@foo = split (/a/, "def");
?
David Black
dblack@icarus.shu.edu
------------------------------
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 269
*************************************