[8413] in Perl-Users-Digest
Perl-Users Digest, Issue: 2030 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 5 08:07:49 1998
Date: Thu, 5 Mar 98 05:00:50 -0800
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, 5 Mar 1998 Volume: 8 Number: 2030
Today's topics:
Re: Are perl $SIG{} handlers inherently unsafe? (Ilya Zakharevich)
Re: Are perl $SIG{} handlers inherently unsafe? <merlyn@stonehenge.com>
Re: Clearing the screen (Jeffrey R. Drumm)
Compiling Perl 5.004_04 <ismithr@info.curtin.edu.au>
Re: complex reg expression help (Abigail)
Re: Context Sensitive RexExp (Tony Bass)
Re: Context Sensitive RexExp <Alex_Whittaker-1@sbphrd.com>
Re: Displaying subdirectories and not filenames <uri@sysarch.com>
Re: Displaying subdirectories and not filenames <koos_pol@nl.compuware.com>
Re: Good Perl book (Abigail)
Help wanted with Filter decrypt <john.clutterbuck@sbs.siemens.co.uk>
Re: Is there a cron written in perl for Win32? (Jim Michael)
Re: Java & Perl which run faster on Unix? (Abigail)
Perl Editor (Bavo De Ridder)
Re: Problem with Netscape Enterprise Server 2.01 and bi mgui@iname.com
Sorting array by a computable field <obi@ub.uit.no>
Special Characters <russwyte@pcisys.net>
Re: What is PERL? Learn JAVA instead? <Harald.Joerg@mch.sni.de>
Re: What is PERL? Learn JAVA instead? (Bart Lateur)
Re: What is PERL? Learn JAVA instead? (Stefaan A. Eeckels)
Re: What is PERL? Learn JAVA instead? <boys@aspentech.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Mar 1998 09:50:59 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Are perl $SIG{} handlers inherently unsafe?
Message-Id: <6dlsi3$cnr$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Gurusamy Sarathy
<gsar@engin.umich.edu>],
who wrote in article <6dlfl8$obe@srvr1.engin.umich.edu>:
> In article <6dl3fl$oq3$2@mathserv.mps.ohio-state.edu>,
> Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
> >You have seen the answer already. (Though I would think that
> >
> > $SIG{CHLD} = sub { wait; return; };
> >
> >is safe in my OS/2 binary release, which contains a voodoo patch which
> >is not allowed into the main distribution.)
>
> You are mistaken about that last point. perl5.004_04 has your mystery
> patch (I even corrected a bug in it for 5.004_05!). The devel versions
> have it too. (See mg.c/sighander())
5.004_04_m1 does not have it. 5.004_56 does not have it. Enough said.
Here it is again, in all its glory! Nobody was interested whether it
makes its miracles on other gcc platforms... No wonder it is not included...
Ilya
--- perl.c.orig Tue Dec 9 00:21:00 1997
+++ perl.c Fri Jan 30 14:16:40 1998
@@ -1150,7 +1150,7 @@ perl_call_sv(SV *sv, I32 flags)
/* See G_* flags in cop.h */
{
dTHR;
- LOGOP myop; /* fake syntax tree node */
+ LOGOP myop,omop; /* fake syntax tree node */
SV** sp = stack_sp;
I32 oldmark;
I32 retval;
@@ -1166,6 +1166,7 @@ perl_call_sv(SV *sv, I32 flags)
SAVETMPS;
}
+omop=myop;
Zero(&myop, 1, LOGOP);
myop.op_next = Nullop;
if (!(flags & G_NOARGS))
------------------------------
Date: 05 Mar 1998 05:54:22 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Are perl $SIG{} handlers inherently unsafe?
Message-Id: <8cafb547sx.fsf@gadget.cscaper.com>
>>>>> "Ilya" == Ilya Zakharevich <ilya@math.ohio-state.edu> writes:
>> Is it unsafe to even just do this in a server
>>
>> $SIG{CHLD} = sub { wait; };
>>
>> ?
Ilya> You have seen the answer already. (Though I would think that
Ilya> $SIG{CHLD} = sub { wait; return; };
Ilya> is safe in my OS/2 binary release, which contains a voodoo patch which
Ilya> is not allowed into the main distribution.)
Of course, even if it *was* safe, it's dangerous code.
Two SIGCHLDs could come in before it's your turn for CPU (like when
two kids croaked while you were out of the run queue). So the
"SIGCHLD pending" bit gets set. Yes. A bit. So when your CPU slice
comes up, you take *one* trip through the handler. You've waited for
*one* child, but two were actually waiting. Now you've got a zombie.
Dangerous Code. Don't do this.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 180 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Thu, 05 Mar 1998 12:39:27 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: Clearing the screen
Message-Id: <34fe9b07.154791608@news.mmc.org>
On 5 Mar 1998 08:40:12 GMT, abigail@fnx.com (Abigail) wrote:
>Joshua Frank (joshua@midwest.net) wrote on 1647 September 1993 in
><URL: news:6dlf59$bhq$1@usenet54.supernews.com>:
>++ Is there a simple way to clear the screen in perl 4? Without using tk or
>++ anything like that.
>
>
>system ("shutdown -now");
>
>
>
>
>Abigail
Hmmm, all that does is display a bunch of messages about processes being
killed, my programs don't seem to run anymore, and the screen still isn't
cleared. This solution seems to work better for me, and is
platform-independent:
$ perl -e 'print "Please press the power switch on your display NOW.\n"'
:-)
Sorry everyone . . . I'll be good now.
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center - Medical Information Systems Group
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me
------------------------------
Date: Thu, 05 Mar 1998 17:24:26 +0800
From: Ray Smith <ismithr@info.curtin.edu.au>
Subject: Compiling Perl 5.004_04
Message-Id: <34FE6F4A.41C6@info.curtin.edu.au>
Hi all,
I have just spent the past couple of hours trying to get Perl 5.004_04
to compile on my system with no luck, can someone please HELP!!!!
I remember having similar problmes when I tried to get Perl 5.003 to
compile, but have forgoten what I did then. I'm running IRIX 6.3 on a
SG O2 R10000 machine. When running the "make" all seems to go well
until it tries to build the miniperl portion. I then get quite a few
warnings, but no errors. Then when the make tries to produce the
DynaLoader I get the following:
predecessor cycle (lib/auto/DynaLoader/DynaLoader.a)
Too many command lines for `lib/auto/DynaLoader/DynaLoader.a' (bu10)
Making DynaLoader (static)
Making DB_File (static)
cc -32 -c -D_BSD_TYPES -D_BSD_TIME -Olimit 3000 -DLANGUAGE_C
-cckr -DDEBUGGING -O2 -DVERSION=\"1.15\" -DXS_VERSION=\"1.15\"
-I../.. DB_File.c
cfe: Error: DB_File.xs, line 77: Syntax Error
HASHINFO hash ;
--------^
*** Error code 1 (bu21)
Can anyone can enlighten me?????
--
Ray Smith
Department of Physiotherapy
Curtin University of Technology
Selby St Shenton Park 6008 Aust.
Ph: +61 8 9266 3667
Fax: +61 8 9266 3636
Email: ray@guardian.curtin.edu.au
--
------------------------------
Date: 5 Mar 1998 09:00:41 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: complex reg expression help
Message-Id: <6dlpjp$51p$1@client2.news.psi.net>
Mike Binkley (Zena_Goddess_Of_Fire@mindless.com) wrote on 1647 September
1993 in <URL: news:Zena_Goddess_Of_Fire-0403982308430001@magmysmac.lfc.edu>:
++ All right, I need to search a string for several regular expressions. For
++ simplicities sake, we'll assume that we just have three regexps, as such:
++
++ $reg[0] = end
++ $reg[1] = ;
++ $reg[2] = +
++
++ Now, basically all that I want to do is take each regexp and replace it by
++ the regexp surrounded by spaces.
++
++ i.e. "end of game" ---> " end of game"
++
++ and so forth. However, I don't want the regexp to acquire the spaces if
++ its part of a word.
++
++ so "surrender" would not become "surr end er"
++
++ How do I do this?
++
++ The code I've got is:
++
++ foreach $value (@reg){$_ =~ s/\W\Q$value\E\W/ $value /g};
++
++ I need the value quoted because some of the actual strings I'm searching
++ for contain MetaCharacters. I was hoping that surrounding it by word
++ boundaries on either side would do the trick, but it doesn't seem to.
++
++ this still turns "bend" into "b end" and it leaves "thing," as "thing,"
++ instead of "thing , "
(You indicated in another posting that you have \b instead of \W)
$ perl -wle '$_ = "bend"; s/\b\Qend\E\b/ end /; print'
bend
So, for 'end' and 'bend', it seems to work for me. However, since you also
have things like ";" and "+", \b isn't going to save you, as
+\b won't match +,.
In fact, it's unclear to me what you want to do with ';' and '+'.
I assume you want 'foo+bar' to become 'foo + bar'. In that case,
the following seems to work:
#!/usr/local/bin/perl -w
my @regs = qw /end ; + thing/;
$_ = "end bend .;. thing, foo+bar ;; +\n";
foreach my $v (@regs) {
my $beg = '(?:^|\w)'; $beg = uc $beg if $v =~ /^\w/;
my $end = '(?:\w|$)'; $end = uc $end if $v =~ /\w$/;
s/($beg)\Q$v\E($end)/$1 $v $2/g;
}
print;
__END__
end bend .;. thing , foo + bar ;; +
If my assumptions are wrong, please explain the problem more detailed.
(Hmmm, but then, a simple \b would have worked too....)
(Did I just reinvent \b?)
Abigail
--
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
print+Just (), another (), Perl (), Hacker ();'
------------------------------
Date: 5 Mar 1998 09:02:17 -0000
From: aeb@brains.cartoon.bt.co.uk (Tony Bass)
Subject: Re: Context Sensitive RexExp
Message-Id: <6dlpmp$sl8$1@brains.cartoon.bt.co.uk>
>From article <vorogzn23pv.fsf@hau112.ha.uk.sbphrd.com>, by Alex Whittaker <whittaa1@hau112.ha.uk.sbphrd.com>:
> I have a requirement to look for a pattern in what amounts to a long
> stream of letters something like this:
> /[SEQRDN].*M[DE].*F/
> Where the length of the whole match is between 10 and 20 characters. Now
> the pattern is such that I could get any number of hits to what I'm
> looking for. So if I do something like this:
> if (/[SEQRDN].*M[DE].*F/ && length($&) >= 10 && length($&) <= 20) {
> be_happy() ;
> }
> ..I will miss hits, because .* is greedy and there are no .{n,m} length
> restrictions in the regexp. If I change to .*? and then check the length,
> I'm still on shakey ground because if I could fall under the 10 limit.
> I suppose what I really want is something which would go like this:
> /(?:[SEQRDN].*M[DE].*F){10,20}/
> ..and not mean the whole pattern repeated ten to twenty times.
> The core problem is that the second .* is given context by the first one,
> so that the pattern fails to be context free.
> Any thoughts?
A three pipe problem. I concur that .* seems not usable here, so
regretfully suggest a somewhat brute force approach of enumerating
substrings matching the parts.
For ease of experimenting I worked on enumerating all substrings of
form a...c...e having length within range, an equivalent problem, and
devised
#! /usr/local/bin/perl -w
use strict;
my $s = 'aababcabcdabcdeabdefabcdefgabcdefghabcdefghiabcdefghij';
grep print("match($_)\n"),
grep m/c/ && length($_) >= 7 && length($_) < 12,
map scalar(reverse $_),
map m/(?=(e.*))/g,
map scalar(reverse $_),
$s =~ m/(?=(a.*))/g;
(that is, reading backwards, generate substrings beginning 'a', filter
to substrings ending 'e', filter on containing 'c' and length)
producing output
match(abcdabcde)
match(abcdeabde)
match(abdefabcde)
I have gratefully borrowed the $' lookalike from a recent thread. I
could not find any $` lookalike suitable in this m//g list context
(perhaps I missed mention in that thread?) so used string reversal
instead.
A scalar rendering with $' and $` is
while ($s =~ m/a/g) {
my $t = "a$'";
while ($t =~ m/e/g) {
my $match = "$`e";
my $n = length($match);
print "match($match)\n" if $match =~ m/c/ && $n >= 7 && $n < 12;
}
}
with the same output.
Tony Bass
--
# A E Bass Tel: (01473) 645305
# MLB 3/19, BT Laboratories e-mail: aeb@saltfarm.bt.co.uk
# Martlesham Heath, Ipswich, Suffolk, IP5 7RE DO NOT e-mail to From: line
# Opinions are my own
------------------------------
Date: Thu, 05 Mar 1998 09:01:32 +0000
From: Alex Whittaker <Alex_Whittaker-1@sbphrd.com>
To: whittaa1@sbphrd.com
Subject: Re: Context Sensitive RexExp
Message-Id: <34FE69EB.EAB6D52E@sbphrd.com>
Tom Grydeland wrote:
> Interesting problem. You had two .* in the original post, right?
> Did you try matching the same string with four different regexes:
>
> / .* .* /
> / .*? .* /
> / .* .*? /
> / .*? .*? /
>
> and then checking each (if any) match for appropriate lenght?
>
> If that doesn't help, perhaps you need to make your own state machine.
>
This would probably work, though it isn't general, for instance if I put yet
another ABC into the string:
XABCABCXXXXABCXXXXXXXABC
I would probably need 16 regexps to find it if it were in the middle
somewhere. Sadly, a finite state machine would not resolve the problem
either, I am building the regular expression from a set of induced horn
clauses, which are considerably more expressive than the context free
grammars that can be expressed in standard finite state transition networks,
and even above the context sensitve recursive transition networks.
Is there a case for extending the regular expression set to include
something like a length range syntax something like the repeat range syntax
of {n,m}, for example if I could say something like this:
/^(.*?ABC.*?)(?-10,20)ABC/
..where (?-10,20) means that the preceding atom must be within 10 - 20
characters long rather than repeated 10 to 20 times as is the case with
{10,20}
Is this the forum to suggest changes like this or should they go elsewhere
(O'Reilly perhaps).
-- Alex Whittaker --
SmithKline Beecham Pharmaceuticals
New Frontiers Science Park Alex_Whittaker-1@sbphrd.com
Harlow, CM19 5AW All I know is that I know nothing
------------------------------
Date: 05 Mar 1998 04:21:16 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Displaying subdirectories and not filenames
Message-Id: <x7zpj5wl0z.fsf@sysarch.com>
Koos Pol <koos_pol@nl.compuware.com> writes:
> # Display a tree structure like the DOS tree
> command #
> #
> #
> # Usage: perl tree.pl [source
> [depth]] #
> #
> #
> ##############################################################################
(snip) lots of code.
have you ever thought about using File::Find? it does all that work for
you and more! all you have to do is format the output in the (spit) dos
way.
CPAN RULES!!
uri
--
Uri Guttman SYStems ARCHitecture and Software Engineering
uri@sysarch.com Have Perl, Will Hack
http://www.sysarch.com (781) 643-7504 x*2 FAX: (781) 643-2710
Try the Best Search Engine on the Net --------> http://www.northernlight.com
------------------------------
Date: Thu, 05 Mar 1998 13:16:29 +0100
From: Koos Pol <koos_pol@nl.compuware.com>
Subject: Re: Displaying subdirectories and not filenames
Message-Id: <34FE979D.20E98967@nl.compuware.com>
Uri Guttman wrote:
>
> have you ever thought about using File::Find? it does all that work for
> you and more! all you have to do is format the output in the (spit) dos
> way.
>
Yes. But:
1. File::Find is extremely slow
2. No platform specific code is needed for this
3. The formatting of all the returns is complicated enough to
write this fairly short routine itself
4. Using CPAN for this play stuff doesn't teach me anything :-)
--
Koos Pol
----------------------------------------------------------------------
S.C. Pol tel: +31 20 3116122
PC Systems Administrator email: Koos_Pol@bigfoot.com
Compuware Europe PGP public key available upon request
A little inaccuracy sometimes saves tons of explanation.
-- H. H. Munroe
------------------------------
Date: 5 Mar 1998 09:01:28 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Good Perl book
Message-Id: <6dlpl8$51p$2@client2.news.psi.net>
Tom O'Neil (oneilt@ucla.edu) wrote on 1647 September 1993 in
<URL: news:6dlf6d$1r04@clnws01.we.highway1.com>:
++ I've had a fair amount of experience with Perl, but it was a couple
++ of years ago so I'm a little rusty. I was wondering what a good Perl
++ (including CGI) book(s) might be for a good reference and reminder?
That was discussed here as recent as yesterday.
Please consult dejanews and www.perl.com.
Abigail
--
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
------------------------------
Date: Thu, 05 Mar 1998 10:04:17 +0000
From: John Clutterbuck <john.clutterbuck@sbs.siemens.co.uk>
Subject: Help wanted with Filter decrypt
Message-Id: <34FE789F.391252AB@sbs.siemens.co.uk>
Can anyone help with an explanation of how to utilise Filter::decrypt
There are several references in FAQ etc. and the Filter documentation
that Filter can be used to run encrypted perl code, but it is not clear
to me how to apply it.
What I would like to know is what steps need to be done with a simple
perl script to encrypt it and then allow it to run from that encrypted
file.
Alternatively if I have completely missed the point please could someone
put me right.
Thanks in anticipation
John Clutterbuck
------------------------------
Date: Thu, 5 Mar 1998 11:26:07 GMT
From: genepool@netcom.com (Jim Michael)
Subject: Re: Is there a cron written in perl for Win32?
Message-Id: <genepoolEpCFrJ.A0v@netcom.com>
Jim Michael (genepool@netcom.com) wrote:
: Kevin Hawley (cchkxh@ARCO.com) wrote:
: : Hi, I'm looking for cron/crontab functionality for Win32. I have used
: : p.s.Sorry for posting to this group; Should there be a
: : ...perl....Win32.. group?
: This has nothing to do with perl. The closest thing under NT is AT.
If you want to write a cron function for win95 I suppose you could do
it using the sleep function.
------------------------------
Date: 5 Mar 1998 09:03:05 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Java & Perl which run faster on Unix?
Message-Id: <6dlpo9$51p$3@client2.news.psi.net>
Collier Cheng (blueshel@ms2.seeder.net) wrote on 1647 September 1993 in
<URL: news:01bd47ff$4de185e0$735d0da3@collier.tku.edu.tw>:
++ Java and Perl ...........Which run faster on Unix?
Define 'runs faster'....
(And which Unix do you mean anyway?)
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: 5 Mar 1998 09:55:56 GMT
From: bavo@ace.ulyssis.student.kuleuven.ac.be (Bavo De Ridder)
Subject: Perl Editor
Message-Id: <889091755.747559@marvin>
Hello,
You probably all know how emacs works (using Lips as the language that gives
most off the functionality to the editor).
Is it possible to write such an editor using Perl as the extention language?
This would be very interesting, since all of us know Perl but not necessarily
Lisp or a dialect.
Does such an editor already exists?
Bavo De Ridder
------------------------------
Date: Thu, 05 Mar 1998 05:49:14 -0600
From: mgui@iname.com
Subject: Re: Problem with Netscape Enterprise Server 2.01 and binary post from Browser Netscape 2.0 or higher
Message-Id: <6dm3ee$fok$1@nnrp1.dejanews.com>
Try this:
$filename = $q->param('uploaded_file');
open(OUT,"c:/out.txt");
binmode(OUT);
while (read($filename,$buffer,1024);
print OUT $buffer;
}
close(OUT);
close($filename);
In article <6de49f$3od$1@nnrp1.dejanews.com>,
yves.cartenstadt@dg1b.cec.be wrote:
>
> Problem With Netscape Enterprise Server 2.01:
> The following lines explain by a small example the problem I have when
trying
> to post binary data (it works fine with ASCII data and works with binary not
> on this server):
>
> The HTML:
> ########
>
> <FORM METHOD=POST enctype="multipart/form-data" action=test.cgi>
> <BR>
> <B>File to Upload:  </B>
> <INPUT NAME = "uploaded_file" TYPE="file" size=41>
> <BR>
> </FORM>
>
> The cgi (use CGI.pm with perl 5.004)
> ##############################
> #!/usr/bin/perl -T
>
> use CGI;
>
> my $q=new CGI;
> $q->import_names('R');
> my $fichier=$R::uploaded_file;
> $filename = $q->param('uploaded_file');
> my $field = undef;
>
> print $q->header();
> print $q->start_html(-title=>'tutu',
> -author=>'tutu',
> -BGCOLOR=>'#C0DCC0');
> print "<PRE>\n";
> print "\n\n";
> print "Refer from ", $q->referer(), "\n";
> print "From ", $q->remote_host(), "\n\n\n";
> print "User File: $R::uploaded_file..\n";
> print "<B>Uploaded_file is : </B>",$filename,"\n\n";
>
> ###################################
> hshould print the uploaded file name.
>
> So, a really small program which use the "input type= file" tag availaible
for
> netscape Browser 2.0 or higher.
> If the file is an ASCII file it works fine.
> If the file is a binary one, the server put a message window after 2 minutes
> that says: "Doucument contains no data".
>
> NB:
> - This program works with binary files with a Netscape Browser on a Linux
> system which call the CGI located on a Linux server with an httpd Apache
> Deamon.
> - This program works with binary files with a Netscape Browser on a NT3.51
> system which call the CGI located on a Linux server with an httpd Apache
> Deamon.
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Thu, 05 Mar 1998 13:44:14 +0100
From: Obiajulu Odu <obi@ub.uit.no>
Subject: Sorting array by a computable field
Message-Id: <34FE9E1E.74400981@ub.uit.no>
Hi all,
I have a file with the following info that I would like to sort by
"name":
key|name|phone|email|notes
I wrote a perl script but it does not work. Can anyone on the group
help me out
with a perl script that can sort the array?
- odu
------------------------------
Date: Wed, 4 Mar 1998 10:53:53 -0700
From: "Russell White" <russwyte@pcisys.net>
Subject: Special Characters
Message-Id: <6dk444$i3v$1@newman.pcisys.net>
Can anybody tell me where I can find a list of special characters that must
be treated with the "\" symbol in print statements? Such as \" Thanks.
------------------------------
Date: 05 Mar 1998 10:03:02 +0100
From: Harald Joerg <Harald.Joerg@mch.sni.de>
Subject: Re: What is PERL? Learn JAVA instead?
Message-Id: <wkogzl7bnd.fsf@mch.sni.de>
abigail@fnx.com (Abigail) writes:
> Frank (FHeasley@chemistry.com) wrote on 1646 September 1993 in
> <URL: news:34fdbc61.4729093@news.halcyon.com>:
> ++ On Wed, 04 Mar 1998 12:09:57 -0500, John Porter <jdporter@min.net>
> ++ wrote:
> ++ >(I bet you knew this was coming:)
> ++ >Name two things that you can do in Java, which would be
> ++ >impossible, or even difficult (by general agreement), to
> ++ >do in Perl.
> ++ >
> ++ Being an expert in neither, I will plead ignorance and give you half
> ++ an answer:
> ++
> ++ 1. Try running a perl script in your user's web browser.
>
> And this proves what? I can run Python applets in someones webbrowser.
> It's just that noone bothered to write a browser that can do Perl
> applets. That's probably because Perl isn't a toy language.
Microsoft invented "perlscript" for MSIE.
But what proves this?
1. Try running a Java applet in your user's web browser. Might work.
2. Try running perlscript in your user's web browser. Might work.
....
n. Try running *anything* in _my_ web browser. Won't work.
Unless I trust you.
--
Oook,
--haj--
------------------------------
Date: Thu, 05 Mar 1998 08:58:47 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: What is PERL? Learn JAVA instead?
Message-Id: <34ff6310.2801724@news.tornado.be>
Brian Slone <bslone@earthlink.net> wrote:
>I really don't know crap about PERL. How is it different from JAVA?
One tiny difference: Java can crash your browser. It happened to me last
week.
Bart.
------------------------------
Date: 5 Mar 1998 08:43:09 GMT
From: Stefaan.Eeckels@ecc.lu (Stefaan A. Eeckels)
Subject: Re: What is PERL? Learn JAVA instead?
Message-Id: <6dloit$m7j$1@justus.ecc.lu>
In article <6dksti$sj3$7@client2.news.psi.net>,
abigail@fnx.com (Abigail) writes:
>
> ++ - Anything involving multiple threads of control.
> ++
> ++ I understand that this last will *finally* be addressed in Perl in the
> ++ near future..
>
> Yes, but threads are overhyped (just like Java). Many things don't
> really need threads.
I'm so glad to read this - I've been doing a lot of NT programming
lately, and I find the lack of 'fork' a lot more constraining than
the lack of threads. IMVHO, the lads who did NT/Win32 should have
incorporated a 'fork' in their API.
My 20 years of Unixing might have given me the wrong reflexes, but
again IMHO it's a lot easier to explicitely share data between
independent processes than to kludge around with thread-local
storage.
Only monolithic apps like Word and Excel benefit from threads,
but that's because they're badly designed (read originated on
MS-DOS) to begin with.
Just my $.02
Stefaan
--
PGP key available from PGP key servers (http://www.pgp.net/pgpnet/)
___________________________________________________________________
"Don't worry about people stealing your ideas. If your ideas
are any good, you'll have to ram them down people's throats."
-- Howard Aiken
------------------------------
Date: Thu, 05 Mar 1998 12:15:19 +0000
From: Ian Boys <boys@aspentech.com>
Subject: Re: What is PERL? Learn JAVA instead?
Message-Id: <34FE9757.ABD@aspentech.com>
[courtesy cc sent to author by email]
Tom Christiansen wrote:
>
> : - Anything involving multiple threads of control.
>
> Sure it does, unless you define redefine what thread of control means.
> I really hate this myth.
>
> The programmer who doesn't understand fork, select, shared memory, file
> locking, or semaphores should not be allowed access to use (so called)
> light-weight threading. I dread the future.
>
I really don't see how this is consistent with hubris, impatience and
lazyness (not that Tom is necessarily saying it is).
In TCL/TK (for example) I see that elegant event driven programs
can be set up, quickly, easily and transparently. I can define
events that I want to act on (IO events, timer events, window events)
and provide handlers that get fired automatically to deal with these
events when they happen. The event handlers can see any global
variables I want them to, with no effort on my part.
I don't see an idiom that allows me to program like this in Perl. I can
use select to wait on IO events, but if I want to use TK as well, have
to put select in a polling loop in order to do other things inbetween
times. If I fork children, I cannot simply share variables with them,
I have to set up more complex code to handle communications between
them.
All of the above is very low level and poses portability problems (as
acknowledged by perlipc - it even uses the word "clunky" in one
instance).
Surely this is not what Perl is supposed to be about? IMHO, it should
take care of low level system operations (like memory allocation),
leaving the user to get on with the high level algorithmic bits that
get the job done.
Tom, why do you protest so much? Can't it be admitted that this is an
area where Perl has scope to get better?
Ian
------------------------------
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 2030
**************************************