[10035] in Perl-Users-Digest
Perl-Users Digest, Issue: 3628 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 3 17:05:37 1998
Date: Thu, 3 Sep 98 14:00:21 -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, 3 Sep 1998 Volume: 8 Number: 3628
Today's topics:
Advocacy <gnat@frii.com>
Beginner asks: Searching for keywords in a large databa <ing-sol@hkisl.net>
Re: Beginner asks: Searching for keywords in a large da <jwb79@mail.idt.net>
Re: CGI POSTing information to another CGI program. <earlw@kodak.com>
does there exist some sort of 'prettyprint'? <rullmann@dfki.de>
Re: does there exist some sort of 'prettyprint'? (Matt Knecht)
Re: Encryption & File Locking (Mark-Jason Dominus)
Getting NT SID using perl <dworrell@wfubmc.edu>
Re: HELP WITH PASSING AN ARRAY TO AN XSUB (Tye McQueen)
Re: How to create a file of known length? (Steve Linberg)
How to remove the file's extention using perl wsayegh@lynx.neu.edu
Re: How to remove the file's extention using perl <frejos@cswnet.com>
Re: Insert .PL in .HTML? (Steve Linberg)
Re: Is perl millennium compliant ? (I R A Aggie)
Re: Is perl millennium compliant ? (Steve Linberg)
loosing variable values in a large program sabhay@my-dejanews.com
Re: Misinterpreted => why no true/false keywords? <tobez@plab.ku.dk>
Re: Net::SMTP Subject?? (John D Groenveld)
Re: Perl & Java - differences and uses <rob.brown@usa.net>
Re: Perl documentation (David Hawker)
Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFO (David Hawker)
Re: Perl gurus opinion needed. (strebbs)
Re: Perl gurus opinion needed. (Nathan V. Patwardhan)
Re: Perl gurus opinion needed. <eashton@bbnplanet.com>
problem evaluating hash using symbolic reference slussier@bigfoot.com
Re: simple prog that causes Segmentation fault (John Klassa)
Re: Telnet daemon <estabroo@ispn.com>
TOOLS Europe 99 - Call for Contributions <tools@tools.com>
TOOLS Europe 99 - Call for Contributions <tools@tools.com>
Re: Why use strict? (Andrew M. Langmead)
Re: {n} quantifier question <JKRY3025@comenius.ms.mff.cuni.cz>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 03 Sep 1998 10:56:59 -0600
From: Nathan Torkington <gnat@frii.com>
Subject: Advocacy
Message-Id: <5q90k19lt0.fsf@prometheus.frii.com>
At the conference, it really became obvious that a lot of people in
the Perl community are crying out for help in selling Perl to their
managers. Some folks need support contracts, others need some kind
of "white paper" marketing fluff, while others just need a list of
other companies in their field that already use Perl.
So, The Perl Institute has started an advocacy mailing list. It's
run by majordomo, so to join just send mail to majordomo@perl.org
saying:
subscribe advocacy
We'd like to hear your success stories (what company you work for, and
how you use Perl) as well as what you feel would help in selling Perl
to management. Successful stories about pitching Perl to the
pointy-haired people are also welcome.
At first, I imagine we'll be brainstorming on the kinds of things we
need to provide. When we get some ideas, we can look at finding
people to make them happen. For instance, The Perl Institute is
working with the O'Reilly PR people to come up with a white paper that
says "it's okay to use Perl" in language that management can
understand (i.e., s/\buse\b/utilize/g), and we hope that you'll
contribute success stories and ideas for this.
Cheers;
Nat
------------------------------
Date: Fri, 04 Sep 1998 02:16:20 +0800
From: Sleiman <ing-sol@hkisl.net>
Subject: Beginner asks: Searching for keywords in a large database of memo's
Message-Id: <35EEDCF4.70F3C65F@hkisl.net>
I am looking for an efficient way to build my database (of memos) so
that searching for keywords is fast.
Searching for the keyword directly in the memos (linear search) is too
slow.
One way to do this is to enter all substrings of the memos into a hash
table and look for the keyword in the hash table. However, this makes
the hash table quite large.
Does the usual DBM do the job?
Does anyone know how search engines (such as yahoo, lycos, etc) store
their data so that finding the documents that contain a keyword is fast?
Tips are appreciated.
Regards
Sleiman
------------------------------
Date: 3 Sep 1998 18:29:29 GMT
From: "Jim Babbington" <jwb79@mail.idt.net>
Subject: Re: Beginner asks: Searching for keywords in a large database of memo's
Message-Id: <01bdd768$ec25c1f0$6488fdc7@dixon>
: Does anyone know how search engines (such as yahoo, lycos, etc) store
: their data so that finding the documents that contain a keyword is fast?
You should check out http://www.hotwired.com/webmonkey/code/97/16/index2a.html?tw=perl
This is a step-by-step article on "How to roll your own search engine".
Good luck,
Jim
------------------------------
Date: Thu, 03 Sep 1998 12:16:23 -0400
From: Earl Westerlund <earlw@kodak.com>
Subject: Re: CGI POSTing information to another CGI program.
Message-Id: <35EEC0D7.7ECD@kodak.com>
Josh Freeman wrote:
>
> I need help with a small problem. I want to pass information using POST
>
> from an HTML form. That program will save the information, then POST
> that information to another CGI program.
>
> The problem is the second step. I need to know how to send information
> from my(the first) CGI program to the second CGI program using POST.
>
> I want to avoid using GET, and also want to avoid have the user have to
> press a second submit button.
>
> Any Ideas?
This is not a Perl question, but since you asked here...
Take a look at CGI.pm. You can find information about it at
http://www.genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.htm.
--
+-----------------+----------------------------------------+
| Earl Westerlund | Kodak's Homepage: http://www.kodak.com |
+-----------------+----------------------------------------+
| The opinions expressed herein are mine and mine alone |
| (most people don't seem to want them anyway) |
+----------------------------------------------------------+
------------------------------
Date: Thu, 03 Sep 1998 19:10:13 +0200
From: Peter Rullmann <rullmann@dfki.de>
Subject: does there exist some sort of 'prettyprint'?
Message-Id: <35EECD75.11A6B515@dfki.de>
Hi there,
does there exist a function like print, but which also prints out whole
datastructures like [123,"bla",{'first'=>10,'second'=>2,},[1,\2,]]?
The above example would for example be printed as:
REF to ARRAY [0]: SCALAR: 123
[1]: SCALAR: "bla"
[2]: REF to HASH {'first'}: SCALAR: 10
{'second'}: SCALAR: 2
[3]: REF to ARRAY [0]: SCALAR: 1
[1]: REF to SCALAR: 2
TIA,
Peter Rullmann <Peter.Rullmann@POboxes.com>
// Student of computer science
// University of Saarbruecken, Germany
\\ //
\X/ Apple Newton, PowerMac, Amiga 4000, DEC Alpha
------------------------------
Date: Thu, 03 Sep 1998 17:35:01 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: does there exist some sort of 'prettyprint'?
Message-Id: <9rAH1.787$nb7.4038918@news3.voicenet.com>
Peter Rullmann <rullmann@dfki.de> wrote:
>Hi there,
>
>does there exist a function like print, but which also prints out whole
>datastructures like [123,"bla",{'first'=>10,'second'=>2,},[1,\2,]]?
>The above example would for example be printed as:
>REF to ARRAY [0]: SCALAR: 123
> [1]: SCALAR: "bla"
> [2]: REF to HASH {'first'}: SCALAR: 10
> {'second'}: SCALAR: 2
> [3]: REF to ARRAY [0]: SCALAR: 1
> [1]: REF to SCALAR: 2
Well, not exactly that format (You'd most likely have to write something
like that yourself).
But, Data::Dumper from the CPAN is *excellent* for this sort of thing.
It outputs real Perl code that you can C<do> into any program. I
personally find real Perl code a lot easier to read that a lot of "REF
TO ARRAY" lines.
Example:
use Data::Dumper;
$anon_array = [123,"bla",{'first'=>10,'second'=>2,},[1,\2,]];
print Data::Dumper->Dumpxs([$anon_array], [qw/anon_array/]);
Will output something like:
$anon_array = [
123,
'bla',
{
'first' => 10,
'second' => 2
},
[
1,
\2
]
];
--
Matt Knecht - <hex@voicenet.com>
------------------------------
Date: 3 Sep 1998 13:19:05 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Encryption & File Locking
Message-Id: <6smj29$n9v$1@monet.op.net>
In article <8caf4h1bms.fsf@gadget.cscaper.com>,
Randal Schwartz <merlyn@stonehenge.com> wrote:
>I don't have a problem with the above where $(SOURCE) might be zero or
>more files.
Yeah. I didn't mean it as a contradiction of you or anything like
this, since I agree with your point completely, and I really like your
`useless use of cat' award. The situation here is clearly different,
but when I saw it I thought of you right away.
>How can you "con-cat-enate" *one* file?
I seem to rememeber hearing Rob Pike or someone like that mention that
very early Unix, before there was `cat', had a `pr' command, not the
same as the one we have now, for printing out the contents of a file.
Eventually, `cat' came along, and sometime later they had the
inspiration that `cat' made `pr' superfluous, so they got rid of it,
just like the way that `sed' replaced `gres'.
------------------------------
Date: Thu, 03 Sep 1998 16:01:21 -0400
From: "David N. Worrell" <dworrell@wfubmc.edu>
Subject: Getting NT SID using perl
Message-Id: <35EEF591.F06963F3@wfubmc.edu>
This is a multi-part message in MIME format.
--------------65CD8198B1ED2E7956561990
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Does anybody know a way of getting the SID for the current user in NT
using perl?
--------------65CD8198B1ED2E7956561990
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for David Worrell
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: David Worrell
n: Worrell;David
org: Wake Forest University School of Medicine
adr: Systems Development;;Medical Center Blvd;Winston-Salem;NC;27157;USA
email;internet: dworrell@wfubmc.edu
title: Systems Programmer/DBA
tel;work: (336)716-4700
tel;fax: (336)716-6705
note: http://www.geocities.com/Heartland/Acres/8174/
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
version: 2.1
end: vcard
--------------65CD8198B1ED2E7956561990--
------------------------------
Date: 3 Sep 1998 12:42:35 -0500
From: tye@fumnix.metronet.com (Tye McQueen)
Subject: Re: HELP WITH PASSING AN ARRAY TO AN XSUB
Message-Id: <6smkeb$q4g@fumnix.metronet.com>
dms@lynx.cat.syr.edu (David Sternlicht) writes:
[...]
) t1 = (char*)SvPV(ST(0),na);
) printf( "%s\n", t1 );
) nc1 = SvIV(ST(1));
) printf( "%d\n", nc1 );
) tab1 = (char*)SvPV(av_shift((AV*)SvRV(ST(2))),na);
) printf( "%s\n", tab1 );
I really dislike Perl code written in C. As you've seen, it is
hard to understand and even harder to debug (which makes it hard
to maintain, etc.).
Since the code you have shown so far shows absolutely no reason for
not just being written in Perl, I assume that you have some reason
for wanting this code in XS that you aren't telling us. However,
I bet you'd still be better off putting _this part_ of the code
in Perl and making the interface to the XS routine simpler for
the XS routine to deal with. For example:
XS code:
void
cfunc(title,ncount,table)
char * title= SvPV($arg,na); /* '\0'-terminate string */
int ncount= SvIV($arg);
char ** table= (char **) SvPV($arg,na); /* NULL-terminated C array */
PREINIT:
char **entry;
CODE:
printf( "%s\n%d\n", title, ncount );
for( entry= table; NULL != *entry; entry++ ) {
printf( "\t%s\n", entry );
}
Perl code:
sub mysub ($$\@)
{
my( $title, $count, $avList )= @_;
my( $table )= pack( ("P"x@$avList)."L", @$avList, 0 );
cfunc( $title, $count, $table );
}
I can understand you wanting to know why your C code didn't work.
It looked fine to me. But I'm not an expert on dealing with
complex Perl data structures in C (where I consider a simple Perl
array as being complex when working in C) so I'm not surprised I
didn't see that the problem was.
Just in case, be careful not to free or modify the values contained
in C<@$avList> once you've built C<$table> until you are through
using C<$table>. C<$table> contains pointers to the values in
C<@$avList> and modifying one of those values could cause Perl to
reallocate the buffer where the value is store which could move
the value in memory which would leave one of the pointers pointing
to an invalid location which could cause your code to "dump core".
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: Thu, 03 Sep 1998 14:21:50 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: How to create a file of known length?
Message-Id: <linberg-0309981421500001@projdirc.literacy.upenn.edu>
In article <6smblt$knr$1@news-2.news.gte.net>, charris@gte.net (Clint
Harris) wrote:
> Hi,
> Does anyone know how to create a file of a known length filled
> with random data (Sort of like od in Unix)? Thanks.
>
> -Clint
how about something like:
for ($i=0; $i<$desired_length; $i++) {print FILE random_char()}
other different ways will surely follow.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Thu, 03 Sep 1998 16:24:01 GMT
From: wsayegh@lynx.neu.edu
Subject: How to remove the file's extention using perl
Message-Id: <6smfr0$ot0$1@nnrp1.dejanews.com>
Well I have a simple PERL question.. I am just learning PERL so please be easy
on me. OK.. now how could I write a function that removes any extention from
the file's name. EX:
index.htm => index
Well I guess that I have to use the SPLIT function, but I frankly don't know
my way around. So please try to explain it to me with a lot of details. And
please don't forget to email me the answer on wsayegh@lynx.neu.edu
Thanks
Waseem
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Thu, 03 Sep 1998 11:41:37 -0500
From: Josh Freeman <frejos@cswnet.com>
Subject: Re: How to remove the file's extention using perl
Message-Id: <35EEC6C1.F3105276@cswnet.com>
<HTML>
Be careful you can use the split, but don't forget that long filenames
are in use almost everywhere now (they can have more than one .).
<P>Try this:
<P>$filename="index.mydocs.html";
<BR>$outname = ""; #initialize
<P>@name = split (/\./, $filename); #you have to escape the period '\.'
it is a special character
<P>$numsplits = @name; #this puts number of splits intp numsplits
<BR>$numsplits --; #subtract one from numsplits (we don't want the last
one, the extension)
<P>for ($i = 0;$i < $numsplits;$i++) {
<BR> $outname .= $name[$i];
<BR>}
<P>That should work for ya.
<P>Josh Freeman
<BR>frejos@cswnet.com
<P>wsayegh@lynx.neu.edu wrote:
<BLOCKQUOTE TYPE=CITE>Well I have a simple PERL question.. I am just learning
PERL so please be easy
<BR>on me. OK.. now how could I write a function that removes any extention
from
<BR>the file's name. EX:
<P>index.htm => index
<P>Well I guess that I have to use the SPLIT function, but I frankly don't
know
<BR>my way around. So please try to explain it to me with a lot of details.
And
<BR>please don't forget to email me the answer on wsayegh@lynx.neu.edu
<P>Thanks
<BR>Waseem
<P>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
<BR><A HREF="http://www.dejanews.com/rg_mkgrp.xp">http://www.dejanews.com/rg_mkgrp.xp</A>
Create Your Own Free Member Forum</BLOCKQUOTE>
</HTML>
------------------------------
Date: Thu, 03 Sep 1998 12:24:53 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Insert .PL in .HTML?
Message-Id: <linberg-0309981224530001@projdirc.literacy.upenn.edu>
In article <35EECFBA.709E@consotech.se>, Cristsbal Hormazabal
<cristo@consotech.se> wrote:
> PS"
> I have tried this and it does not work:
> <!--#exec cgi="/cgi-bin/cgiwrap/r3988/vote.pl"-->
Ask your system administrator about server-side includes. This is not a
Perl question.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Thu, 03 Sep 1998 15:20:19 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Is perl millennium compliant ?
Message-Id: <fl_aggie-0309981520190001@aggie.coaps.fsu.edu>
In article <35EEB1F2.34BD@boat.bt.com>, georgelj@boat.bt.com wrote:
+ Does snybody knwo if the current releases of perl have been certified
+ for millennium compliance ?
*Which* millenium?
James
------------------------------
Date: Thu, 03 Sep 1998 14:19:58 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Is perl millennium compliant ?
Message-Id: <linberg-0309981419580001@projdirc.literacy.upenn.edu>
In article <35EEB1F2.34BD@boat.bt.com>, georgelj@boat.bt.com wrote:
> Does snybody knwo if the current releases of perl have been certified
> for millennium compliance ?
PLEASE read the FAQ.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Thu, 03 Sep 1998 16:12:29 GMT
From: sabhay@my-dejanews.com
Subject: loosing variable values in a large program
Message-Id: <6smf5d$nvt$1@nnrp1.dejanews.com>
Hello,
I am facing a problem of loosing variable values. In a large program a
variable looses its value in between unless I redifne that variable with new
name.
Any soultion this problem ?
Thanks in advance
Abhay
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 03 Sep 1998 19:37:28 +0200
From: Anton Berezin <tobez@plab.ku.dk>
Subject: Re: Misinterpreted => why no true/false keywords?
Message-Id: <86ogsx85d3.fsf@lion.plab.ku.dk>
Zenin <zenin@bawdycaste.org> writes:
> : Going over your examples one at a time, I find that base.pm is not
> : syntactic sugar,
>
> Huh?
>
> BEGIN { require Foo (); @ISA = qw(Foo) }
>
> vs
>
> use base qw(Foo);
>From base.pm:
Roughly similar in effect to
BEGIN {
require Foo;
require Bar;
push @ISA, qw(Foo Bar);
}
Will also initialize the %FIELDS hash if one of the base classes has
it.
Please note this ``roughly''. And ``initialize the %FIELDS'', also.
--
Anton Berezin <tobez@plab.ku.dk>
The Protein Laboratory, University of Copenhagen
------------------------------
Date: 3 Sep 1998 13:31:41 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: Net::SMTP Subject??
Message-Id: <6smjpt$64u$1@tholian.cse.psu.edu>
$smtp->data();
$smtp->datasend("Subject: foobar\n");
$smtp->datasend("\n");
John
groenveld@acm.org
------------------------------
Date: Thu, 3 Sep 1998 12:57:57 -0400
From: "Rob Brown" <rob.brown@usa.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <6smhsk$mv9$1@camel19.mindspring.com>
Joseph Kesselman, yclept Keshlam wrote in message
<35ED927D.CE97825B@us.ibm.com>...
>And as an old programmer, I'd add:
> Never ask _anywhere_ "which language is better".
> That's not a meaningful question. First state
> precisely what your problem domain is, and
> what the constraints upon it are; you can then
> discuss the advantages and disadvantages of
> individual languages for that specific
> application.
>
> _ALL_ languages can argue that they're "better" in
> one way or another. If they couldn't, they wouldn't
> still exist. The question is whether they do what
> you want to do and in the way that you want to do it.
Regardless, I find the discussion following his question to be very
meaningful....with one exception, which is this part of the thread which
contributes nothing but to scold the guy for asking the question.
If you are offended by discussions of comparing and contrasting languages,
don't read them, rather than telling people not to discuss them. I'm
learning a lot from it...as a java/C/C++ programmer questioning whether Perl
should be added to my bag of tricks. So what if they tend to get into a
religious discussion? There's still useful information there.
BTW, you are asking him to clarify the constraints....well, he mentioned
that he's 17 years old and an internet page designer, what more do you need
to know? I think its perfectly possible to give him a meaningful
information that will help him decide which language might be the better one
to invest his time learning right now, as well as being useful to others who
may be interested. (take a look at Patricia's response as an example).
-rob
>-----------------------------------------------------------------
>Joe Kesselman ("Keshlam"), http://www.lovesong.com/people/keshlam
> New URL for Walkabout Clearwater Coffeehouse and Chorus:
> http://www.lovesong.com/walkabout
------------------------------
Date: Thu, 03 Sep 1998 18:42:17 GMT
From: dhawker@removethis.bigfoot.com (David Hawker)
Subject: Re: Perl documentation
Message-Id: <35eee253.12361934@news.cableol.net>
On 24 Aug 1998 18:40:33 GMT, stanley@skyking.OCE.ORST.EDU (John Stanley)
felt the need to post:
>In article <fl_aggie-2408981004270001@aggie.coaps.fsu.edu>,
>I R A Aggie <fl_aggie@thepentagon.com> wrote:
>>That's not what he said...there are ways of dealing with spam...either
>>via the latest-n-greatest sendmail, or thru a filter (procmail, filteragent),
>>or better yet, a combination.
>
>This does not help those who have to pay for the mail before they can
I am one of those. I don't actually pay for each message - I just pay for
being online.
>have the latest-n-greatest sendmail or procmail work on it. Yes, you can
>filter it all you want once you get it, but if it has already cost you
>the money to get it, why bother?
In fact, spam costing extra money to download is a trivial thing for me - I
spend so much time online.
--
dhawker@bigfoot.com | ICQ 7222349
http://dhawker.home.ml.org
------------------------------
Date: Thu, 03 Sep 1998 18:42:13 GMT
From: dhawker@removethis.bigfoot.com (David Hawker)
Subject: Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFORE POSTING
Message-Id: <35efb93f.1843847@news.cableol.net>
On Mon, 24 Aug 1998 15:22:35 -0500, fl_aggie@thepentagon.com (I R A Aggie)
felt the need to post:
>In article <35f5a953.14677674@news.cableol.net>,
>david.hawker@cableol.co.uk wrote:
>
>+ On Mon, 24 Aug 1998 09:45:03 -0500, fl_aggie@thepentagon.com (I R A Aggie)
>+ felt the need to post:
>
>+ >Learning Perl, Randal L. Schwartz, ISBN 1-56592-042-2.
>
>+ Books are always gonna be out of date,
>
>Even the first edition Llama book will teach you perl suitable for perl v5.
>Does it cover _everything_? no. But then again, in the introductory class,
>you don't really need to know about modules and OO programming...
Fair enough.
>+ they might cost a lot of money,
>
>Considering what you pay for the interpreter,
The interpreter I use on Linux: our virtual server provider bought it, not
us. Besides, I didn't know you had to PAY for perl? I thought it was all
freeware stuff.
The MS-DOS interpreter I use on my computer: probably up to #1 (that's
$1.50 or so for the Americans) in phone bill.
>the price of a book is
>trivial. If it isn't, well, how can you afford a computer??
I sort of didn't pay a lot for this computer. My dad payed for most of it.
I payed #200 - how does that compare to the cost of the book?
>+ they may be unavailable in the small library in the quiet country corner one
>+ lives in,
>
>print qq(Excuse me, but could you order this book for me? I know the author's
>name, the publisher, and the ISBN number. Does that help?\n);
What's qq?
>+ there's always the latest perl documentation available on the net...
>
>And the knock on that documentation is that it often times requires a
>knowledge of perl.
Then you get some docs which explain the knowledge the docs require. Perl
tutorials for beginners will be available. And of course folks can always
ask in here <grin> or read the FAQ which I hope is posted frequently.
>+ OTOH a book may be the very thing your average newbie can get to grips
>+ with. :)
>
>And I do believe that was the gripe..."where is the beginners class"...
Although if you drop it in the bath, it's gone. If you accidentally delete
the docs from your computer, a simple re-download does the trick.
--
dhawker@bigfoot.com | ICQ 7222349
http://dhawker.home.ml.org
------------------------------
Date: Thu, 03 Sep 1998 17:06:00 GMT
From: strebkov@scssi.scetv.org (strebbs)
Subject: Re: Perl gurus opinion needed.
Message-Id: <35eecb15.8529682@news.scsn.net>
On Thu, 03 Sep 1998 02:26:35 -0400, shawn@ultranet.com (Shawn
O'Donnell) wrote:
>In article <MPG.10574b6d7ba716cb989788@nntp.hpl.hp.com>, lr@hpl.hp.com
>(Larry Rosler) wrote:
>
>> Dmitry Dorofeev wrote:
>> > it's sounds 'Perlacker'.
>>
>> Dmitry's problem is that pronouncing it in Russian gives something like
>> "Perl Gacker". Gack! He is trying to drop the 'H' and it isn't as easy
>> as it is for the Cockneys.
>
>Sometimes, 'H' -> 'Kh,' a raspy 'h' like the one you may know from
>Hannukah. Pizza Hut goes as "Pitstsa Khat," not "Pitstsa Gat" [pronounced
>'pizza gut'], even though that's what you end up with.
>
>How about Perl kheker? or Perlmaster? or Perlozornik? (Perl mischief-maker)
>
>I think there's an accepted Russian translation of "hacker," but it
>emphasizes the breaking-and-entering sense of the term.
>
>Perlacker sounds like, "tot, u kogo ne khvataet perla."
>
>--Shawn
>
>P.S. All of this makes me wonder about Perl and Unicode...
How do you have such fluency in Russian? If you are a native speaker,
your name does fascinate...
Just curious
Andrew Strebkov (native speaker :)
------------------------------
Date: Thu, 03 Sep 1998 16:58:00 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Perl gurus opinion needed.
Message-Id: <sUzH1.35$k6.205561@news.shore.net>
Mark-Jason Dominus (mjd@op.net) wrote:
: At the conference, when we were printing certificates, people asked us
: for the darndest things. We certified people as Perl Programmers,
: Perl Studmuffins, Perl Gurus, Perl Hackers, Perl Engineers, Perl
[snip]
Don't forget "Perl Trolls". Hope this helps!
:-)
--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>
------------------------------
Date: Thu, 03 Sep 1998 17:12:57 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Perl gurus opinion needed.
Message-Id: <35EECBC3.C702991F@bbnplanet.com>
> : At the conference, when we were printing certificates, people asked us
> : for the darndest things. We certified people as Perl Programmers,
> : Perl Studmuffins, Perl Gurus, Perl Hackers, Perl Engineers, Perl
> [snip]
perl studmuffin? haahaah thats almost as good as perl gelding. i love
how guys name themselves and their hardware/software in this business.
perl gladiator
perl stoner
perl mangler
perl warrior
perl klingon
perl banshee (sp)
perl amazonian
perl pharoh
perl dauphine
perl byzantine
perl 007
perl viking
perl emperor
perl caesar
perl freak
perl cowboy
perl wrangler
perl guy
perl .....
> Don't forget "Perl Trolls". Hope this helps!
how could we forget _you_ darling? ;) hope this helps!
e.
------------------------------
Date: Thu, 03 Sep 1998 18:42:51 GMT
From: slussier@bigfoot.com
Subject: problem evaluating hash using symbolic reference
Message-Id: <6smnvb$34t$1@nnrp1.dejanews.com>
I've been programming Perl 5 on and off for a while, but
I'm still no expert at it. Here's my problem:
I need to do this:
$report{client}{project}{total} = $time;
Except that, in my program, for some reasons I won't explain,
'{client}{project}' is a string:
$args = '{client}{project};
So I can set my value using:
eval ('$report'.$args."{total} = $time");
But I read this is an obsolete way to procede (and for other reasons),
so I'd like to do it using symbolic references. I tried refering to my
hash using:
${'$report'.$args.'{total}'} = $time";
But it won't work. I know that I'm missing something and I would
like very much to understand what I do wrong (and, in this case, what
I'm doing). How do you turn my $args string so it can be parsed
in an array context??
Seven and a half thanks...
--
Stephane Lussier
slussier@bigfoot.com
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 3 Sep 1998 20:27:37 GMT
From: klassa@aur.alcatel.com (John Klassa)
Subject: Re: simple prog that causes Segmentation fault
Message-Id: <6smu3p$e7g$1@aurwww.aur.alcatel.com>
On 30 Aug 1998 08:36:39 +0200, Pascal Rigaux <rigaux@pomme.irisa.fr> wrote:
> Segmentation fault on:
> perl_5.004_04 Linux 2.0.35 i686 cyrix, Debian 2.0
> perl-5.004_04 Linux 2.0.34 i586 unknown, Redhat 5.1
> perl-5.004_03 SunOS 5.6 sun4u sparc SUNW,Ultra-30
> perl-5.004_03 SunOS 5.5.1 sun4c sparc SUNW,Sun_4_50
>
> Don't crashes on:
> perl-5.004_1 Linux 2.0.32 i686 unknown, Redhat 5.0
> perl-??? from a Redhat 4.1
For what it's worth, it *doesn't* crash on perl5.00502 under
SunOS aursgh 5.5.1 Generic_103640-18 sun4u sparc SUNW,Ultra-2.
--
John Klassa / Alcatel Telecom / Raleigh, NC, USA <><
------------------------------
Date: Thu, 03 Sep 1998 12:31:18 -0500
From: Eric Estabrooks <estabroo@ispn.com>
Subject: Re: Telnet daemon
Message-Id: <35EED266.AD99B67B@ispn.com>
Jonathan Stowe wrote:
>
> [posted & mailed to original poster]
>
> On Fri, 28 Aug 1998 18:56:46 +0800, Sachin Hamirwasia wrote :
>
> >Hi All,
> >
> >I want to have in my Apache server (I don't have full server access, only
> >CGI) a facility to allow people to use their telnet programs (eg. telnet.exe
> >in DOS/Win) to log into a discussion group and post/read messages. I need
> >help in making this script in PERL.
> >
[ snip some information about server progamming in perl ]
perldoc IO::Socket <- contains almost everything you need to now for a
server app connection (Many Thanks to Graham Barr)
>
> But if you only have CGI via an ISP then all bets are off of course.
>
Why would all bets be off? You could have your cgi fork a process that
would open a port to listen on while the main part of the cgi program
returned a page that was an href (if your browser supports telnet) and
also list the server and the port number to telnet to (maybe with a
username and password specific to that connection). This would allow
the forked (from cgi) process to handle the discussion group part.
It seems that if the port was greater than 1024 (or whatever it is for
your flavor of unix) that any user (usually nobody or http) should be
able to establish this kind of connection. Which is probably why a lot
of isps don't like cgi's written in C where they can't examine the
source code.
CGI:
main-> generate username and password for telnet connection (helps cut
down on abuse)
main-> fork a child
main-> wait for child process
main-> print page with pertinent information (login, password, server,
port)
child-> fork grandchild
child-> exit (frees up main and orphans grandchild)
grandchild-> open port for listening
grandchild-> wait for connection and verify user
grandchild-> do whatever for however long we need to (do the server
stuff)
One of the problems with the above model is you need to round robin your
ports if you only wanted to use one port you could do something more
like this
grandchild-> check to see if port is in use
grandchild-> if it isn't open the port and open a named pipe listen on
both the port and the named pipe (probably use a select)
grandchild-> if it is already in use (we must have been run at least
once already) open the named pipe and pass the username and password and
incoming ip num
grandchild->exit
Or if you didn't want to use a named pipe you could just append a
certain file (doesn't matter what) that your server process opens and
reads on a connect and matches login password and ip for incoming
connection
Hope this helps,
Eric
estabroo@ispn.com
Change is inevitable, except from a vending machine.
-- Author Unknown --
------------------------------
Date: Thu, 3 Sep 1998 09:02:19 -0700
From: "TOOLS Conferences" <tools@tools.com>
Subject: TOOLS Europe 99 - Call for Contributions
Message-Id: <6smig7$5f$1@news.rain.org>
TOOLS CONFERENCE SERIES
TECHNOLOGY OF OBJECT-ORIENTED LANGUAGES AND SYSTEMS
TOOLS EUROPE '99
Objects, Components, Agents
29th International Conference and Exhibition
Nancy, France, June 7-10, 1999
Conference Chair: Jean-Pierre Finance, Henri Poincari University, France
Programmme Chair: Richard Mitchell, University of Brighton, UK
Tutorials Chair: Alan Cameron Wills, TriReme International Ltd, UK
Workshops & Panels Chair: Jan Bosch, University of Karlskrona/Ronneby,
Sweden
Organising Committee Chair: Martine Gautier, Henri Poincari University,
France
Conference Series Chair: Bertrand Meyer, ISE, USA
TOOLS Europe '99 is now soliciting contributions for technical papers,
tutorials, workshops, and panels.
Submission guidelines are available at http://www.tools.com/europe/
IMPORTANT DATES
Tutorial, Workshop and Panel proposals: Friday, January 8, 1999
Notice of submission for technical papers: Friday, February 12, 1999
Submission of technical papers: Friday, February 19, 1999
Notification of acceptance: Monday, March 29, 1999
Final manuscripts due at IEEE: Friday, April 16, 1999
Conference: Monday 7 to Thursday 10, June 1999
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FOR MORE INFORMATION ON TOOLS Europe '99 OR ANY OTHER
EVENTS IN THE TOOLS CONFERENCE SERIES,
VISIT OUR WEB SITE AT http://www.tools.com
OR CONTACT US AT tools@tools.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Thu, 3 Sep 1998 10:12:48 -0700
From: "TOOLS Conferences" <tools@tools.com>
Subject: TOOLS Europe 99 - Call for Contributions
Message-Id: <6smiq6$qj$1@news.rain.org>
TOOLS CONFERENCE SERIES
TECHNOLOGY OF OBJECT-ORIENTED LANGUAGES AND SYSTEMS
TOOLS EUROPE '99
Objects, Components, Agents
29th International Conference and Exhibition
Nancy, France, June 7-10, 1999
Conference Chair: Jean-Pierre Finance, Henri Poincari University, France
Programmme Chair: Richard Mitchell, University of Brighton, UK
Tutorials Chair: Alan Cameron Wills, TriReme International Ltd, UK
Workshops & Panels Chair: Jan Bosch, University of Karlskrona/Ronneby,
Sweden
Organising Committee Chair: Martine Gautier, Henri Poincari University,
France
Conference Series Chair: Bertrand Meyer, ISE, USA
TOOLS Europe '99 is now soliciting contributions for technical papers,
tutorials, workshops, and panels.
Submission guidelines are available at http://www.tools.com/europe/
IMPORTANT DATES
Tutorial, Workshop and Panel proposals: Friday, January 8, 1999
Notice of submission for technical papers: Friday, February 12, 1999
Submission of technical papers: Friday, February 19, 1999
Notification of acceptance: Monday, March 29, 1999
Final manuscripts due at IEEE: Friday, April 16, 1999
Conference: Monday 7 to Thursday 10, June 1999
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FOR MORE INFORMATION ON TOOLS Europe '99 OR ANY OTHER
EVENTS IN THE TOOLS CONFERENCE SERIES,
VISIT OUR WEB SITE AT http://www.tools.com
OR CONTACT US AT tools@tools.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Thu, 3 Sep 1998 18:40:48 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Why use strict?
Message-Id: <Eyq180.91u@world.std.com>
Brian Wilson <brian_wilson@om.cv.hp.com> writes:
>What are some other good reasons I can use in my argument?
--
Andrew Langmead
------------------------------
Date: Thu, 03 Sep 1998 20:06:11 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
Subject: Re: {n} quantifier question
Message-Id: <35EF5923.150F@comenius.ms.mff.cuni.cz>
rowlands@my-dejanews.com wrote:
>
> In article <x3y3eagak6b.fsf@tigre.matrox.com>,
> Ala Qumsieh <aqumsieh@tigre.matrox.com> wrote:
> >
> > #!/usr/local/bin/perl
> >
> > if ("ab" =~ /(a*[^b]*b){2}/) { die "YES\n" }
> > print "Nope!\n";
> > __END__
> >
> > This prints "Nope!" on my machine! What version of Perl are you using?
> > (I doubt if that would make a difference anyway!)
>
> It prints "YES" on my machine - honest! I'm using perl version 5.001,
> unofficial patchlevel 1m, Perl for Win32 build 110.
>
> --
> Stephen Rowland
So either your perl is broken or you mistyped the expresion.
It realy should print "Nope!"
Lets look at the regexp.
1. a*[^b]*
since a is also different than b, this expression can be shortened to
[^b]*
2. [^b]*b
this means: "any number of arbitrary characters except 'b' folowed by
one 'b'"
3. /([^b]*b){2}/ is the same as /[^b]*b[^b]*b/ (except for defining
references)
4. /[^b]b[^b]b/
since you do not have ^ at the beginning of the regexp, this may be
converted to
/b[^b]*b/
5. /b[^b]*b/
and this matches all strings that contain at least two 'b's.
(anything, 'b', anything except 'b', 'b', anything)
QED
Jenda
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3628
**************************************