[10150] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3743 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 17 17:07:20 1998

Date: Thu, 17 Sep 98 14:00:18 -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, 17 Sep 1998     Volume: 8 Number: 3743

Today's topics:
    Re: any way to encrypt my script? droby@copyright.com
        array of directories, subdirectories rseweryniak@my-dejanews.com
    Re: Can I foreach multiple arrays? (John Moreno)
        can MSWord and Adobe PDF docs be read for indexing? <ptrainor@bbn.com>
    Re: how safe is xor encryption ? (Mark-Jason Dominus)
    Re: how safe is xor encryption ? <dejah@DejahsPrivateIce.com>
    Re: how safe is xor encryption ? (Abigail)
    Re: how safe is xor encryption ? (Ben Coleman)
    Re: How to "execute" a CGI (Perl) script inside a HTML  (Alan Strassberg)
    Re: How to "execute" a CGI (Perl) script inside a HTML  <eric.means@louisville.edu>
    Re: How to "execute" a CGI (Perl) script inside a HTML  <JayGuerette@pobox.com>
        ISO: BBS CGI script for web site <hankm@ems.att.com>
    Re: Kermit Speaks <jdporter@min.net>
    Re: Kermit Speaks (Craig Berry)
        output buffer through socket <vpodgurschi@techstar-idf.com>
    Re: Perl & Java - differences and uses (Mike Meyer)
    Re: Perl & Java - differences and uses <jdporter@min.net>
    Re: Perl & Java - differences and uses <dalke@bioreason.com>
    Re: Perl & Java - differences and uses <garry@sage.att.com>
        perl video games <Adamz@gaming-age.com>
        Questions about Perl (Twan Kogels)
    Re: Removing double entries from array <r28629@email.sps.mot.com>
    Re: Removing double entries from array <r28629@email.sps.mot.com>
        split() from within C <jcmurphy+usenet@smurfland.cit.buffalo.edu>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Thu, 17 Sep 1998 18:45:06 GMT
From: droby@copyright.com
Subject: Re: any way to encrypt my script?
Message-Id: <6trlbi$gli$1@nnrp1.dejanews.com>

In article <obww72kjpb.fsf@alder.dev.tivoli.com>,
  "Jim Woodgate" <jdw@dev.tivoli.com> wrote:
>
> abigail@fnx.com (Abigail) writes:
> > ++ Can
> > ++ I encrypt my script so that it can be executed but not read?
> >
> > No.
>
> > Abigail
> > --
> > perl5.004 -wMMath::BigInt -e'$^V=new
Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'
>
> how can you say 'no'?  Your sig "can be executed but not read"... :)
>

Abigail's sigs can be decrypted if you have the key.

--
Don Roby <droby@copyright.com>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 17 Sep 1998 19:02:24 GMT
From: rseweryniak@my-dejanews.com
Subject: array of directories, subdirectories
Message-Id: <6trmc0$i4i$1@nnrp1.dejanews.com>

What segment of code would I use to create an array of directories and its
subdirectories (not files)?  Would like to create an array similar to the
following:

@all_dirs = ('/images',
             '/images/space',
             '/images/water',
             '/pictures',
             '/pictures/animals',
             '/pictures/plants',
             );

I am using Perl for Win32 on a NT server.  Any help would be greatly
appreciated.  Thanks in advance.


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 17 Sep 1998 14:58:09 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: Can I foreach multiple arrays?
Message-Id: <1dfi9f6.1q7gs351wfcqh7N@roxboro0-033.dyn.interpath.net>

Abigail <abigail@fnx.com> wrote:

-snip-

> ++ >> ++ On 15 Sep 1998, Abigail wrote:
> ++ >> ++
> ++ >> ++ > Tom Christiansen (tchrist@mox.perl.com) wrote on MDCCCXLI September
> ++ >> ++ > MCMXCIII in <URL: news:6tmlgd$hbp$2@csnews.cs.colorado.edu>:
> ++ >
> ++ >Why 1841, 1842 and 1993?
> ++ >
> ++ 
> ++ Must be a Y2K bug.
> 
> 
> s/bug/fix/;

Abigail - come'on don't you think that TC at least is operating in '98?

-- 
John Moreno


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

Date: Thu, 17 Sep 1998 20:21:18 GMT
From: "Pat Trainor" <ptrainor@bbn.com>
Subject: can MSWord and Adobe PDF docs be read for indexing?
Message-Id: <01bde277$6cab6780$8d1701c0@frank.bbn.com>


Idea:

Read msword, excel, or pdf files for textual indexing for a search engine.
They will be residing on a unix box and at my mercy.

What methods exist to read/catalogue the text in them? "strings"? There has
to be a better answer, eh?! :)

Bonus Question: 

What is required (even for $$$) that enables perl to write data in msword,
excel, pdf formats?

TIA!


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

Date: 17 Sep 1998 15:22:34 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: how safe is xor encryption ?
Message-Id: <6trnhq$esl$1@monet.op.net>

In article <6trip1$1lq@enews1.newsguy.com>,
Felix S. Gallo <fsg@newsguy.com> wrote:
>p.s. psych

Bah.  I already mentioned the checksums.  At best, they are only 91%
effective.



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

Date: Thu, 17 Sep 1998 15:03:28 -0500
From: Mary E Tyler <dejah@DejahsPrivateIce.com>
Subject: Re: how safe is xor encryption ?
Message-Id: <36016B0B.56AF@DejahsPrivateIce.com>

Oh NO! MArk-Jason! it's *not* a joke? now i understand it even less!

why 53.15 bits... and how do you have  15% of a bit... i thought a "bit"
was either on or off... am i missing a piece of vocabulary here?

dejah, what i don't know, won't hurt me? much?


Mark-Jason Dominus wrote:
> 
> In article <36010614.4A77@DejahsPrivateIce.com>,
> Mary E Tyler  <dejah@DejahsPrivateIce.com> wrote:
> >it might have been an answer... but it was not one i understood. except
> >that it might be some sort of strange joke.
> 
> Sorry.  It wasn't a strange joke, although I admit that I've never
> felt more peculiar about adding `hope this helps' at the end of an
> article.
> 
> Maybe a better answer to this question is:
> 
> 1. There are ways to measure the randomness of an information source.
> 
> 2. The more random it is the more rapidly it generates information.
>    (Extreme example: A source that generates the same thing every time
>    is not random and is not generating any information either.)
> 
> 3. Information content and randomness are both measured in `bits'.
> 
> 4. To be suitably random, the source of keys (the users) must generate
>    information at a rate of at least 53.15 bits per key.
> 
> 5. To find out what this really means, see (for example) `Symbols,
>    Signals, and Noise', by J.R. Pierce.  (Harper, 1961.) It is a
>    really fun  introduction to information theory.

-- 
i trust i make myself obscure, i have need of obscurity now- robert bolt

a heated exchange of unread mail would be welcomed by all- christensen

Skating Fiction. Featuring the  highly acclaimed serial On The Edge!
http://www.DejahsPrivateIce.com


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

Date: 17 Sep 1998 20:20:28 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: how safe is xor encryption ?
Message-Id: <6trquc$ndm$1@client3.news.psi.net>

Felix S. Gallo (fsg@newsguy.com) wrote on MDCCCXLIII September MCMXCIII
in <URL: news:6trip1$1lq@enews1.newsguy.com>:
++ 
++ Abigail writes:
++ >Felix S. Gallo writes:
++ >++ Sociology and physics, normally.  Which is to say, imagine if
++ >++ your bank asked you to remember a 300 word text, or to recite
++ >++ a 120 letter 'random string' over the telephone.  People wouldn't
++ >++ accept it, even if it were truly secure (and if they did, they'd likely
++ >++ make errors and get mad).  Until recently, it was also surprisingly
++ >++ difficult to physically carry around 2 megabits.
++ >
++ >Uhm, uhm, what keeps you from creating a piece of plastic, about 4 inches
++ >by 2.5 inches, with a nice logo and 16 digits on it - to be used as key?
++ 
++ Possession of such a thing can easily be faked when purchasing over
++ long distances.

People seem to have no problem with that when it comes to CC#'s themselves.



Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'


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

Date: Thu, 17 Sep 1998 20:21:44 GMT
From: tnguru@termnetinc.com (Ben Coleman)
Subject: Re: how safe is xor encryption ?
Message-Id: <36016dae.503576264@news.mindspring.com>

On Wed, 16 Sep 1998 14:11:48 -0500, Mary E Tyler
<dejah@DejahsPrivateIce.com> wrote:

>the first 4 refer to the clearing house(for lack of a better term). the
>second four refer to your bank. the third four are a reference internal
>to your bank. the fourth are your account number. or so i have been
>told.

Actually, I think this varies depending on the card type.  E.g. for Visa
cards, the first 6 digits are a BIN(Bank Identification Number) identifying
the issuing bank.  Note also that while credit card numbers are often 16
digits, they can be other lengths(American Express is typically 15).

Ben
-- 
Ben Coleman
Senior Systems Analyst
TermNet Merchant Services, Inc.
Atlanta, GA


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

Date: 17 Sep 1998 13:02:59 -0700
From: alan@bali.seg.wj.com (Alan Strassberg)
Subject: Re: How to "execute" a CGI (Perl) script inside a HTML page.
Message-Id: <6trptj$k3j$1@bali.seg.wj.com>

In article <3601586A.9C187ED3@cisco.com>, Jian Zhang  <jian@cisco.com> wrote:
>
>I need to "execute" a short perl CGI script inside a HTML page
>automatically when a page is loaded.  The script generates some

	ePerl ? (embedded Perl)

	http://www.engelschall.com/sw/eperl/

				alan
-- 
alan@wj.com


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

Date: Thu, 17 Sep 1998 16:32:09 -0400
From: "Eric Means" <eric.means@louisville.edu>
Subject: Re: How to "execute" a CGI (Perl) script inside a HTML page.
Message-Id: <aieM1.1782$rm3.1981939754@news.ntr.net>

Check to see if your server is set up with Server Side Includes.  If it is,
try something like (in the HTML source)

<!--#include cgi="/path/to/cgi.pl" -->

wherever you want the script output.

--
Eric Means
Louisville Gas & Electric Co.
eric.means@lgeenergy.com
Jian Zhang wrote in message <3601586A.9C187ED3@cisco.com>...
>Hi,
>
>I need to "execute" a short perl CGI script inside a HTML page
>automatically when a page is loaded.  The script generates some
>segment of of the HTML file.  My web server has been set up for CGI
>support.
>One way I normally "execute" server side CGI spcripts is to ask users to
>hit a button:
>
><form action="short_scrit.pl.cgi" method = "post"><input type = "submit"
>
>value = "text string"></form>
>
>But now I need the CGI script "executed" automatically whenever the page
>is loaded.
>
>Please help.  Any sample code or pointers will be greatly appreciated.
>
>Jian Zhang
>San Jose, CA
>
>
>




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

Date: Thu, 17 Sep 1998 16:38:37 -0400
From: "Jay Guerette" <JayGuerette@pobox.com>
Subject: Re: How to "execute" a CGI (Perl) script inside a HTML page.
Message-Id: <6trs7a$91j@news-central.tiac.net>

>I need to "execute" a short perl CGI script inside a HTML page
>automatically when a page is loaded.  The script generates some
>segment of of the HTML file.  My web server has been set up for CGI
>support.
[snip]
>But now I need the CGI script "executed" automatically whenever the page
>is loaded.

Check out PerlScript. It will only work on IE4 as far as I know... but it's
full blown Perl... very powerful.





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

Date: Thu, 17 Sep 1998 15:07:50 -0400
From: "Hank Missenheim_Jr" <hankm@ems.att.com>
Subject: ISO: BBS CGI script for web site
Message-Id: <6trmto$83d@newsb.netnews.att.com>

Can anybody suggest a good source for a BBS CGI script for a web site?
Thanks!




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

Date: Wed, 16 Sep 1998 16:08:54 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Kermit Speaks
Message-Id: <36001AD6.F55919DF@min.net>

Jacqui Caren Jacqui Caren wrote:
> 
> I fully expect that Abigail is female.  You will find that those
> (mostly men) who play silly games hiding behind reverse gender
> psuedonyms tend not to use such PNs for commercial operations or
> operate in serious newsgroups such as ciwa* or the clp* trees.

And at the same time, *you* will find that you still have some
things to learn.

"Abigail" is in fact a male.  His real name is Haijo Schipper.

Perhaps out of some perverted sense of respect, we on clpm
generally try to not make an issue of it.
It's more fun to watch the clueless making fools of themselves.

Frankly, I have next to no respect for "Abigail", for exactly
the reasons you mention above: it's a silly childish game, and
I don't expect serious, intelligent professionals to engage in
it in serious venues like clpm.  But what can you do.
Maybe Haijo Schipper is one of those "woman trapped in a man's
body" cases.  Since I don't know, I just let him be.
If I said anything publicly, it might be Me who gets
humiliated.

hand,
John Porter


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

Date: 17 Sep 1998 20:45:29 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Kermit Speaks
Message-Id: <6trsd9$2lk$1@marina.cinenet.net>

John Porter (jdporter@min.net) wrote:
: Maybe Haijo Schipper is one of those "woman trapped in a man's
: body" cases.  Since I don't know, I just let him be.
: If I said anything publicly, it might be Me who gets
: humiliated.

<boggle>
So instead you restrict your comments to the private venue
of...clpm?
</boggle>

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: Thu, 17 Sep 1998 15:29:35 -0400
From: Vlad Podgurschi <vpodgurschi@techstar-idf.com>
Subject: output buffer through socket
Message-Id: <3601631E.715FF88@techstar-idf.com>

Hello,

I have an output buffer problem.

The problem is that:

*  open a socket S, connect to a web server and flush output buffer (
`select(S);  $|=1; ...' )
*  make a request with my web client through S; the request string is:

    GET http://www.site1.com/ HTTP/1.0
    Header1: value1
    ...  more headers ...
    <blank_line>

   (is through proxy, that's why is all URL in request)
*  everything works great; get `302 Moved Temporarily' response, socket
closed
*  restart doing exactly the same thing with the new URL, so:
    open a new socket;
    connect;
    flush buffer for output in S;

but the request comes out like this:

     HTTP/1.0//www.site2.com/     , instead of
    GET http://www.site2.com/

Clearly is output buffering problem ( ` HTTP/1.0' fits exactly over `GET
http:' and I tried to change to HTTP/0.9 and HTTP/1.1 to see if this
remains from the request or is the beginning of the server response =>
is from the request because it changes every time).
This thing is happening to both STDOUT and S socket.
More than that, if I write the request string in a file too, is written
correctly.
I tried to use sysread instead of print when writing to the socket, but
no change.

What I cannot figure out is how come that in the buffer remains a piece
of the request string and not, at least, the final part (remember, all
the above request is ONE string). On the other hand, why does it flush
the output buffer only first time (on the first request) in 2 identical
processes?  The socket is opened for the first request and then closed.
Another socket is opened for redirection and clodsed at the end.

I bet is a simple thing, but I am just at the beginning, so your help is
really appreciated!

Thank you and good luck!

Vlad        li@smart.net



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

Date: Thu, 17 Sep 1998 12:14:01 PST
From: bouncenews@contessa.phone.net (Mike Meyer)
Subject: Re: Perl & Java - differences and uses
Message-Id: <19980917.79EFFA0.AC54@contessa.phone.net>

In <906047183.589733@thrush.omix.com>, Zenin <zenin@bawdycaste.org> wrote:
> Garrett G. Hodgson <garry@sage.att.com> wrote:
> 	>snip<
> : the "magic whitespace" rant is getting tiresome.
> 
> 	Maybe, but it's also quite valid.

About as valid as flaming about Perl using special characters to
determina a variables type. The only other language I know of that
uses that silly trick is BASIC. BLISS uses magic characters to
determine the kind of access, but that's difference. Add in all the
other magic characters and operators, and Perl takes a silver (behind
TECO) in the executable line noise category.

Which is one of the reasons I gave up on it when I found something I
thought was better. I find that Pythons lack of noise words and
indentation as control work very well for me. I don't expect others to
like them, or to dislike Perl's line noise like syntax. Harping on a
syntactc feature you dislike about a language is at best a waste of
time. Better to ignore it, and concentrate on the real features of the
language, to better understand them and incorporate them into a
language you like.

	<mike

--
Do NOT reply to the address in the From: header. Reply to mwm instead of
bouncenews at the same machine. Mail to bouncenews will be returned with
instructions on reaching me. Sending unsoliticed email I consider commercial
gives me permission to subscribe you to a mail list of my choice.


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

Date: Wed, 16 Sep 1998 16:22:56 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <36001E20.7A64092D@min.net>

George Reese wrote:
> 
> In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
> : George Reese wrote:
> :>
> :> Natural language is a superset of any computer language I certainly
> :> have ever programmed in.  That would include both perl and python.  I
> :> honestly do not know how a computer language could express something
> :> that you could not express in English--how would you even talk about
> :> such a thing?
> 
> : You are saying that all rational human thought can be efficiently
> : expressed in (say) English.  This is absurd.  Just like much of
> : what you say.  Take a hike.  Better yet, go brush up on your
> : lambda calculus, first-order logic, and chaos theory.
> 
> Well, I think after this I will just ignore your contributions to this
> thread.

That's certainly your prerogative, and I won't be offended; but
the my point (which you may have missed) was that your
assertion -- "Natural language is a superset of computer language"
-- is false.  If it were really the case, then computer languages
would be designed as strict subsets of English (or Esperanto, or
whatever).  But they weren't, for a very compelling reason: it's
impossible.

> I honestly do not know how a computer language could express something
> that you could not express in English --

Fine, but that's a limitation of your knowledge, not of computer
languages.

> how would you even talk about such a thing?

In the language itself, or in some equivalent language -- which, btw,
need not be a formal language -- or perhaps in some ad hoc metalanguage.
People do it all the time.

-- 
John Porter


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

Date: Thu, 17 Sep 1998 14:50:08 -0700
From: Andrew Dalke <dalke@bioreason.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <36018410.3980C303@bioreason.com>

Zenin <zenin@bawdycaste.org> asked:
>  Please show *any* Python or Java code that when translated to Perl
>  would be done uncleanly by default.  *Any* code.

Yep, I'm starting from here again.  I just got through reading
Friedl's "Mastering Regular Expressions" (very good book, BTW)
and got to the wish list section for perl, which suggested the
following as an example of something that's easy in Python
and more cumbersome in Perl (unless something has been added to
perl since 5.003 days, which wouldn't surprise me given the other
changes I didn't know about :).

This uses named groups (the "?P<>" construct) and the fact the
you have better access to subgroup information (the feature
to which Zenin said:
> :   print "The range is", match_obj.group(1)
> 
>         Blagh. :-)
:) so you can get the start and end positions of the pattern
match.



from re import search
l = [
  "name: Andrew id: 5",
  "numero: 2 nombre: Peter",
  "What is your name? John  What is your id? 9",
]

for text in l:
    m = search(r'name[:?]\s(?P<name>\w+).*id[?:]\s(?P<id>\d+)', text) or \
        search(r'numero:\s(?P<id>\d+).*nombre:\s(?P<name>\w+)', text)
    print "The name", m.group("name"), "starts at character", \
        m.start("name"), "and ends at character", m.end("name")-1
    print "The id", m.group("id"), "is", \
        ("before", "after")[m.end("id") > m.end("name")], "the name"


The name Andrew starts at character 6 and ends at character 11
The id 5 is after the name
The name Peter starts at character 18 and ends at character 22
The id 2 is before the name
The name John starts at character 19 and ends at character 22
The id 9 is after the name



What does the perl version of this look like?

						Andrew
						dalke@bioreason.com


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

Date: Thu, 17 Sep 1998 16:29:24 -0400
From: "Garrett G. Hodgson" <garry@sage.att.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <36017124.BBC0B0FA@sage.att.com>

Zenin wrote:
> 
> Garrett G. Hodgson <garry@sage.att.com> wrote:
>         >snip<
> : the "magic whitespace" rant is getting tiresome.
> 
>         Maybe, but it's also quite valid.

is not.  is too.  not.  too....
(just thought i'd save us some time)

> : in practice, i find it just isn't an issue. 2 spaces,
> : 4 spaces, tabs, whatever.  a consistent indentation is
> : what you want to aid comprehension, and is also what python
> : wants to determine structure.  works out rather well.
> 
>         The problem is when tabs and spaces are used together, at
>         which point the design fails hard.

they can be used together as much as you'd like, as long as you
are consistent.  most developers are consistent in the way they indent
their code.  if it really bothers one to have to do this,
they shouldn't use python.  if it really bothers me to use
semicolons, i shouldn't use c.

and when i pick up code from someone else who indents incorrectly...
oops...i mean differently, it is a trivial matter to convert it my
preferred style.  i do this with java, as well, using a pretty printer
i wrote in python.  piece o' cake.

> : the curly braces add nothing to comprehension but visual noise.
> 
>         Stretch a block over a screen boundary (such as for a package/class
>         def) and they add quite a bit.  They also make it very easy to jump
>         to the ends of a given block, which in the case of the above could
>         be many screens away.

indeed, that might be convenient, but this is an editor design,
not language syntax, issue.

> They also add freedom in coding style, which
>         is considered a feature by nearly every language except Python.

i guess i find plenty of opportunities for creativity in software
beyond whether i must indent consistently.  when i starting using
python,
after decades of c/c++, the layout of my code changed hardly at all.
i just stopped adding the noise characters.  (though it took a long
time to stop adding ';' at the end of each line :-)

besides, from a freedom standpoint, the requirement that i inform
the interpreter of the type of each variable reference seems far more
intrusive.  i guess we all choose our own shackles.

> : python eliminated that argument, and so had to find some other
> : style religious argument to have.
> 
>         It replaced a purely style issue with a real problem.  I
>         fail to see how this would be a good thing.

again, in practice, it is a non-issue.  to the extent that it might
be a problem, python appears to offer enough other benefits that
people are happy to use it anyway.



-- 
Garry Hodgson			and when they offer
garry@sage.att.com		golden apples
Software Innovation Services	are you sure you'll refuse?
AT&T Labs			heaven help the fool.


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

Date: Thu, 17 Sep 1998 16:17:38 -0400
From: Adam Ziegler <Adamz@gaming-age.com>
Subject: perl video games
Message-Id: <36016E62.5EC1AC0@gaming-age.com>

Would it ever be possible to program video games with PERL, even simple
ones?

--
Adam Ziegler



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

Date: Thu, 17 Sep 1998 20:23:52 GMT
From: 888twan@888nlweb.com (Twan Kogels)
Subject: Questions about Perl
Message-Id: <36016dbe.8927658@news.nl.net>

Hi,

I'm planning to learn pearl, i have experience with c, c++, java and
the win32 API. I have some questions about pearl, here they come :

1) i want to test my perl script locally, do i need a server? and
which server is the best. I'm using win95
2) which version of perl should i use?
3) are there any good online tutorials?
4) are there any free IDE's or just handy editors for perl?

Many thanks for any reply's,

Twan
Email   : Remove ALL 8's to obtain my valid email address
Website : http://twan.hypermart.net


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

Date: Thu, 17 Sep 1998 13:45:40 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: Removing double entries from array
Message-Id: <360158D4.AF1E3EB2@email.sps.mot.com>

Marc-A. Woog wrote:
> I have tons of entries in @url_list, sometimes two or more times the
> same. I want to remove all redundant entries and this is the code I
> came up 'til now:
 
 [...]

> Is there a more elegant and efficient (meaning faster) way to do the
> same (this looks more like basic than perl to me)?

Try this:

	@url_list = do { my @myhash; @myhash{@words} = (); keys %myhash};

The last time I timed it, it should be about 20times faster than your
code.

Hope it helps.

-TK


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

Date: Thu, 17 Sep 1998 13:50:49 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: Removing double entries from array
Message-Id: <36015A09.813CB948@email.sps.mot.com>

Tk Soh wrote:
>  
>         @url_list = do { my @myhash; @myhash{@words} = (); keys %myhash};
> 

Typo correction:
	'my @myhash' should be 'my %myhash'

But Perl should be smart enough to still make it work :)

-TK


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

Date: 17 Sep 1998 15:26:42 -0400
From: Jeff Murphy <jcmurphy+usenet@smurfland.cit.buffalo.edu>
Subject: split() from within C
Message-Id: <wwaogse35hq.fsf@smurfland.cit.buffalo.edu>


i'm writing a perlmodule and would like to call split() from
within the C code. can someone give me an example of how to do this?
i checked out the perlembed page, but i'm not sure if i
need to 

 my_perl = perl_alloc();
 perl_construct( my_perl );

since it's within a perl module .. i'm also not sure how to retrieve
the (return) array values from the stack. 

jeff


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

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

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