[18395] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 563 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 25 18:05:54 2001

Date: Sun, 25 Mar 2001 15:05:17 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <985561516-v10-i563@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 25 Mar 2001     Volume: 10 Number: 563

Today's topics:
    Re: "perldoc" broken in Solaris 8 (Ben Okopnik)
        Basic socket logic (server) discussion... <lafondd@sympatico.ca>
    Re: CGI style - CGI vs "here is" vs ?? <comdog@panix.com>
    Re: every 15 seconds <bart.lateur@skynet.be>
    Re: every 15 seconds (Abigail)
    Re: every 15 seconds <uri@sysarch.com>
        forking a process that stays around <tps12@columbia.edu>
    Re: forking a process that stays around <tps12@columbia.edu>
    Re: forking a process that stays around (David Efflandt)
    Re: Good Perl Code Syntax Highlighting Editor for Linux <e96mani@yahoo.dk>
    Re: Good Perl Code Syntax Highlighting Editor for Linux <djberg96@hotmail.com>
    Re: Good Perl Code Syntax Highlighting Editor for Linux (Steven Smolinski)
    Re: Help needed: simulating a browser to download web-b <abc@def.ghi>
    Re: Help needed: simulating a browser to download web-b <abc@def.ghi>
    Re: Hmmm... Which PERL Book Is Best Suited For This??? <webmaster@webdragon.unmunge.net>
    Re: Multidimensional Arrays? <mjcarman@home.com>
        Need help with this syntax? (Mark Johnson)
    Re: Partial Apology to Perl Fans <mark-lists@webstylists.com>
        passwd change from cgi-script <ganesh@gcol.com>
        Perl and OS X (was Re: Good Perl Code Syntax Highlighti <webmaster@webdragon.unmunge.net>
    Re: Perl and OS X (was Re: Good Perl Code Syntax Highli <uri@sysarch.com>
    Re: Perl and OS X (was Re: Good Perl Code Syntax Highli <webmaster@webdragon.unmunge.net>
        Perl public key encryption <chris@cake.clara.net>
    Re: Perl public key encryption <news04@crazyscot.com>
    Re: Print "tar" Success or Failure (Tad McClellan)
    Re: Read from file into hash <webmaster@webdragon.unmunge.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 25 Mar 2001 16:30:07 GMT
From: ben-fuzzybear@geocities.com (Ben Okopnik)
Subject: Re: "perldoc" broken in Solaris 8
Message-Id: <slrn9bs7ck.ask.ben-fuzzybear@Odin.Thor>

The ancient archives of Fri, 23 Mar 2001 13:13:57 GMT showed
Rafael Garcia-Suarez of comp.lang.perl.misc speaking thus:
>
>The OP gave the right version number, Solaris 8 comes with perl 5.005_03:
>
>$ uname -srv
>SunOS 5.8 Generic
>$ /usr/bin/perl --version
>
>This is perl, version 5.005_03 built for sun4-solaris
>[...]
>
>To the OP : are you sure that you use the original perldoc given with
>the OS, located in /usr/perl5/5.00503/bin by default ? My version
>understands -q and works perfectly.


Grrf. I'm home, once again, and about 2,300 miles from the machines that I 
was working with, but I remember that 'perldoc' was definitely NOT in
/usr/perl5/5.00503/bin - typing 'which perldoc' gave me back a path which 
I subsequently used to replace the original with a working copy (I don't 
remember what the path was, unfortunately). The thing is, all of these
machines had just (minutes before) been jump-started over the network with
a fresh copy of Solaris 8, no modifications to PATH or anything like that:
I assumed that there would be only one Perl installation on there (I think
that it's a reasonable guess), and consequently only a single 'perldoc'. If
that's not the case, then the problems are even weirder and deeper.

If need be, I can e-mail somebody at that facility and have them ping me 
back with the results of 'which perldoc', and maybe have them check 
'/usr/perl5/5.00503/bin' for a second (and perhaps different) copy. Would 
it make sense to do that?


Ben Okopnik
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The search for the correct phrase is not a pedantic fad but a vital
necessity. Words are precision tools. Imprecision engenders ambiguity and
hours are wasted in removing verbal misunderstandings before the argument
of substance can begin. -- Anonymous


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

Date: Sun, 25 Mar 2001 20:30:13 GMT
From: "wdstaff" <lafondd@sympatico.ca>
Subject: Basic socket logic (server) discussion...
Message-Id: <pzsv6.457933$f36.14534686@news20.bellglobal.com>

hey peeps,
so here's the thing that HAUNT me days & nights...
______________

Imagine that there is 3 users connected to the server.
USER1  is sending some data to server,
USER2  is sending some data to server too.
USER3  is not doing nothing,

the rules are when a USER send data to server, we must send back this data
to every USERS.

SO:
USER1 finish to send its data and we must send this data to every existing
users.
--> But USER2 is sending some data to the server. <--
--> But USER2 still sending some data while USER1 is finish  <-- said twice!
really important!

So were able to send data to USER1,USER3 but not USER2.
so we send to USER1 and USER3.
but hey!!!!!!
we CANNOT just not send data from USER1 because USER2 is already doing
something!
we ABSOLUTELY need to send data from every USERS to ANY USERS!!!!
how can it be possible to send the data from USER1 (to every users) if the
socket of USER2 is already in use?

experience required.......(guru)

P.S.: you think you have enough skills to complete this? .....
        go ahead and write the SERVER code...
       Credits and every infos you'd like will be incorporated to our final
application. (Flash5 project)

EMAIL ME BEFORE YOU MAKE A MOVE!
details you must know before writing the code
webdreamers2k@hotmail.com

Please be fast....as we kinda have timelimit problems.. and we must test
your work.







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

Date: Sun, 25 Mar 2001 10:20:27 -0600
From: brian d foy <comdog@panix.com>
Subject: Re: CGI style - CGI vs "here is" vs ??
Message-Id: <comdog-D7EBF4.10202725032001@news.panix.com>

In article <tbr0rso7cbj714@corp.supernews.com>, egwong@netcom.com 
wrote:

> It doesn't matter how many different "calls" to a module you make in a
> program, the module will only be loaded once, so don't worry about that.
> It is true, though, that there is a certain small overhead for *any*
> subroutine call in perl, but if you have to worry about that fine of an
> optimization, then perl's probably the wrong solution for you.

Perl wouldn't be the wrong solution necessarily, but CGI would ;)

-- 
brian d foy <comdog@panix.com>



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

Date: Sun, 25 Mar 2001 20:09:24 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: every 15 seconds
Message-Id: <i2ksbtoke0ct1hgqt2rpie088b9p6s7voe@4ax.com>

Tom Scheper wrote:

>Ahh.. But what if print "Hello World!" is replaced with something that
>takes several seconds to complete, but at other times just
>miliseconds?

Shouldn't this be a cron job, or similar? If my script has a memory
leak, or uses a lot of memory at one time, the memory consumption is out
of bounds forever. I'd rather launch a script every 15 seconds.

-- 
	Bart.


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

Date: Sun, 25 Mar 2001 20:48:09 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: every 15 seconds
Message-Id: <slrn9bsmc9.ovi.abigail@tsathoggua.rlyeh.net>

Bart Lateur (bart.lateur@skynet.be) wrote on MMDCCLXIII September
MCMXCIII in <URL:news:i2ksbtoke0ct1hgqt2rpie088b9p6s7voe@4ax.com>:
!! Tom Scheper wrote:
!! 
!! >Ahh.. But what if print "Hello World!" is replaced with something that
!! >takes several seconds to complete, but at other times just
!! >miliseconds?
!! 
!! Shouldn't this be a cron job, or similar? If my script has a memory
!! leak, or uses a lot of memory at one time, the memory consumption is out
!! of bounds forever. I'd rather launch a script every 15 seconds.


Besides the fact that cron doesn't have second precision, and the
overhead of starting up your Perl program every 15 seconds, you
need to do a lot of extra work if you need to keep state.


Abigail
-- 
$=-=4*++$|;{print$"x--$==>"\@\x7Fy~*kde~box*Zoxf*Bkiaox \r"
                            ^
$/x24if!select$,,$,,$,,join+q=.==>$^W=>$|;$=&&redo}sleep$|;


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

Date: Sun, 25 Mar 2001 23:02:55 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: every 15 seconds
Message-Id: <x7snk1zc2s.fsf@home.sysarch.com>

>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:

  BL> Tom Scheper wrote:
  >> Ahh.. But what if print "Hello World!" is replaced with something that
  >> takes several seconds to complete, but at other times just
  >> miliseconds?

  BL> Shouldn't this be a cron job, or similar? If my script has a memory
  BL> leak, or uses a lot of memory at one time, the memory consumption is out
  BL> of bounds forever. I'd rather launch a script every 15 seconds.

cron has a resolution of only 1 minute and has no way to make that a
hard value (it may slide some).

no one has mentioned what i consider to be one of the best and most
accurate ways to do this. i may have lost the original intent but if you
want make sure something happens every 15 seconds and not worry about
how long it actually takes, use Event.pm and a timer event. if you
enable the 'hard' flag on the timer, it will trigger at 15 second
intervals regardless of how long the previous event took to
complete.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Sun, 25 Mar 2001 12:38:15 -0500
From: tps12 <tps12@columbia.edu>
Subject: forking a process that stays around
Message-Id: <Pine.GSO.4.10.10103251233420.8222-100000@sawasdee.cc.columbia.edu>

Hi, I'm sure this is a common question, but I've been unable to dig up an
answer. I want to use system("./script.cgi arg=foo &") to spawn a child
that stays around when the user closes his web browser, or Windows
crashes, or whatever. The child is basically there to make sure that the
user submits something: it sleeps for a couple minutes, and if nothing has
been submitted it fills in some null data for that user. This is for a
game, and I want to handle the error condition where a user loads the
"play" page but never plays, for whatever reason. From my tests, the child
does not appear to be sticking around. Any ideas?

                                                         | tps
                                               --------- |   2we1ve
                                                         | r&r



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

Date: Sun, 25 Mar 2001 13:00:14 -0500
From: tps12 <tps12@columbia.edu>
Subject: Re: forking a process that stays around
Message-Id: <Pine.GSO.4.10.10103251256330.8222-100000@sawasdee.cc.columbia.edu>

Sorry, let me elaborate a little. I couldn't seem to get it to work with
system(), but I can do it, sort of, with fork(). The child goes and sleeps
and does its thing, even if the browser window is closed. But since the
child doesn't exit for a few minutes, the user sees the little "N" in the
upper-right of the browser window spinning or whatever: the page keeps
loading. Then, when the javascript auto-submit kicks in (sorry, just have
to provide some context), there's a little "Transfer interrupted!" before
the results load. What I want to achieve is
1. page loads and finishes loading
and
2. child runs regardless of when/whether parent exits
Is this possible?

On Sun, 25 Mar 2001, tps12 wrote:

> Hi, I'm sure this is a common question, but I've been unable to dig up an
> answer. I want to use system("./script.cgi arg=foo &") to spawn a child
> that stays around when the user closes his web browser, or Windows
> crashes, or whatever. The child is basically there to make sure that the
> user submits something: it sleeps for a couple minutes, and if nothing has
> been submitted it fills in some null data for that user. This is for a
> game, and I want to handle the error condition where a user loads the
> "play" page but never plays, for whatever reason. From my tests, the child
> does not appear to be sticking around. Any ideas?
> 

                                                         | tps
                                               --------- |   2we1ve
                                                         | r&r



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

Date: Sun, 25 Mar 2001 19:17:40 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: forking a process that stays around
Message-Id: <slrn9bsh2k.us.efflandt@efflandt.xnet.com>

On Sun, 25 Mar 2001 13:00:14 -0500, tps12 <tps12@columbia.edu> wrote:
>1. page loads and finishes loading
>and
>2. child runs regardless of when/whether parent exits
>Is this possible?

perldoc perlipc

Look for daemonize.  You have to alienate the child from the parent by
closing all the doors between them.

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


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

Date: Sun, 25 Mar 2001 17:58:20 -0800
From: <e96mani@yahoo.dk>
Subject: Re: Good Perl Code Syntax Highlighting Editor for Linux??
Message-Id: <99l88m$s3$1@sunsite.dk>

hi,

"Aaron Cline" <acline@okstateREMOVECAPS.edu> wrote in message
news:EJgv6.283$Rx.2844@news.onenet.net...
> Well, the title says most of what I mean.  I need a good Perl syntax
> highlighting editor for Linux (glibc-2.1, i386).  I like to use Vim, and I
> have found that supposedly it has syntax highlighting capabilities but I
> can't figure out how to get them to work.  If anyone has instructions on
> how to do this, I would be very grateful, or if you have a favorite
editor,
> please enlighten me.

I do have DOS background, so I'm using mc (midnight commander v. 5.5) editer
it makes all perl style
syntax highlinghting. it is much easy to use though very powerful!





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

Date: Sun, 25 Mar 2001 17:18:35 GMT
From: "Daniel Berger" <djberg96@hotmail.com>
Subject: Re: Good Perl Code Syntax Highlighting Editor for Linux??
Message-Id: <LLpv6.4363$pS2.204787@typhoon.mn.mediaone.net>


"Aaron Cline" <acline@okstateREMOVECAPS.edu> wrote in message
news:EJgv6.283$Rx.2844@news.onenet.net...
> Well, the title says most of what I mean.  I need a good Perl syntax
> highlighting editor for Linux (glibc-2.1, i386).  I like to use Vim, and I
> have found that supposedly it has syntax highlighting capabilities but I
> can't figure out how to get them to work.  If anyone has instructions on
> how to do this, I would be very grateful, or if you have a favorite
editor,
> please enlighten me.
>
> Thanks,
>
> Aaron Cline

ActiveState's Komodo (beta) is out there for Linux.  Can use it for Python,
too.

Dan




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

Date: Sun, 25 Mar 2001 18:19:34 GMT
From: sjs@linux.ca (Steven Smolinski)
Subject: Re: Good Perl Code Syntax Highlighting Editor for Linux??
Message-Id: <slrn9bsilv.qu.sjs@ragnar.stevens.gulch>

Aaron Cline <acline@okstateREMOVECAPS.edu> wrote:
>                                           [...]  I like to use Vim, and I 
> have found that supposedly it has syntax highlighting capabilities but I 
> can't figure out how to get them to work.

:help syntax

Essentially, you need to have syntax turned on:

:syntax on

You may need to tell vim you're working with Perl:

:set syntax=perl

Vim comes with voluminous documentation, just like perl.

Steve
-- 
Steven Smolinski => http://www.steven.cx/


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

Date: Sun, 25 Mar 2001 12:37:59 -0500
From: CSW <abc@def.ghi>
Subject: Re: Help needed: simulating a browser to download web-based mail
Message-Id: <3ABE2CF7.F933F5D7@def.ghi>

Ilmari Karonen wrote:
> 
> In article <3ABCE4C2.9BE06CAE@def.ghi>, CSW wrote:
> >
> >I have many messages in a free web-based mail account that I want to
> >back up. The problem: the server is very slow (& the banner ads don't
> >make it any faster). It will be quite painful to use a browser to
> >retrieve and save/forward the messages one by one.
> 
> How many messages?  Sure, you could do it with LWP, but tweaking it to
> work just like you want it to may take longer than doing it by hand,
> unless "many" means "at least several hundreds of".

"Many" right now is below 300; I've done a few by hand.

> If the banner ads etc. are slowing things down, why not try turning off
> image loading in your browser?

Thanks, it improves the responsiveness quite a bit, more than I
expected.

> Of course, if you want to do this with a script because you *like* doing
> it that way, then have fun.  Just don't expect it to be the fastest way.

I've done some timing experiements. I figured it'll take about 2.5 hours
to do it by hand, assuming I don't lose any efficiency because of
fatigue or boredom.

Doing it with a script actually takes longer (I've invested > 2 hrs on
it at this point), but it's educational, more fun, and less boring.

CSW


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

Date: Sun, 25 Mar 2001 12:42:43 -0500
From: CSW <abc@def.ghi>
Subject: Re: Help needed: simulating a browser to download web-based mail
Message-Id: <3ABE2E13.6276CA8E@def.ghi>

Tina Mueller wrote:
> 
> In comp.lang.perl.misc CSW <abc@def.ghi> wrote:
> 
> > What I'm looking for is a script/program for simulating a browser,
> > including the password authentication and cookies bits, so that I can
> > automate the download process.
> 
> perldoc lwpcook
 
Thanks. "lwpcook" is the cookbook; where can I find the reference
documentation for LWP?

CSW


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

Date: 25 Mar 2001 17:06:54 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Re: Hmmm... Which PERL Book Is Best Suited For This???
Message-Id: <99l8je$bbv$3@216.155.33.37>

In article <3abb627d.87528499@news.earthlink.net>,
 bogus@erol.com (---Pete---) wrote:

 | Everyone,
 | Just to let you know, I searched the last 3000+ posts for
 | "BOOK" titles and none of the posts addressed what I
 | am ask here. Allow me to explain:
 | 
 | I'm a Visual Basic programmer, new to PERL and only read
 | one book so far titled "SAMS Teach Your Perl in 24hours".
 | Well, about a month later, it's clear that I need another book
 | to get me past the basics <grin>.
 | 
 | I know everyone has their favorite book but I need a 
 | recomendation for a book to be used in a specific
 | manner as follows:
 | 
 | I'm looking for a reference book that is instructional as well
 | as extensively indexed such that I can pickup a sample
 | Perl script and quiclky find topics or functions like sysread(),
 | or  even simple things like "$!" that I find in the sample Perl
 | code. This PERL book should also written with the CGI in
 | mind.
 | 
 | PS: For newbies, the SAMS book I mentioned above is
 | good for the learning the basics but once you begin to
 | actually write scripts, you end up frustrated thinking.. 
 | "Damn,  I know I read about 'this or that' and it's in this 
 | book somewhere but I just can't seem to find it now."
 | In other words, it's instructional but not a very good
 | reference simply becasue they did not index it
 | properly.
 | 
 | Any recomendations?
 | 
 | ---pete---
 | 

"Programming Perl" by Larry Wall, Tom Christiansen, and Randal Schwartz 
has been pretty much my 'bible' as far as that goes. I haven't picked up 
too many others yet simply because I've been focusing my attentions on 
specific aspects like DBI (for which I bought "Programming the Perl 
DBI") and OO stuff (for which I picked up Damian Conway's excellent 
"Object Oriented Perl") 

I must have read through PP about 7 times now, and as my knowledge grows 
(you know the drill: skim the parts you can't understand clearly, and 
keep reading til you finish. then try some stuff, and look up what you 
need to.. then re-read the book again, and you'll find that some things 
are now clearer and you skim less and less as time goes on... :), I've 
found the book to be incredibly useful. Of course, much of it is a 
simple re-iteration of what's already in the perldocs, but it's nice 
having a dead-tree version of all that, nicely indexed, that you can 
take with you on the bus or train, (or in the loo. :)

You may need to compare your version of Perl with that specified in the 
book, as I am not certain that it (the book) is current for the latest 
release of Perl -- the one I have isn't even up to 5.005_03, but since 
MacPerl is only 5.004 anyway, that's not much of an issue at the moment.

-- 
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw"; 
# ( damn spammers. *shakes fist* take a hint. =:P )


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

Date: Sun, 25 Mar 2001 18:53:27 GMT
From: Michael Carman <mjcarman@home.com>
Subject: Re: Multidimensional Arrays?
Message-Id: <3ABE3F03.B071B927@home.com>

Milliwave wrote:
> 
> I'm new to Perl, and have been reading about how to create
> a (n-row by 7 column) array? The book I have only shows me 
> how to access a multidimensional array, but does not
> inform me how to go about creating one?

There are many ways to create a LoL -- which one is the best depends on
the format of your source data and the format you're trying to coax it
into.

Note that Perl doesn't directly support multidimensional data
structures, but you can emulate them through the use of references. That
means you need to learn about references first. Start with the
perlreftut manpage for a crash course, then read the perldsc (Perl Data
Structures Cookbook) manpage. It includes some examples which should be
helpful to you. After you've gotten a grip on those delve into the
perlref manpage to get a full understanding of references. 

-mjc


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

Date: Sun, 25 Mar 2001 21:43:53 GMT
From: crvmp3@hotmail.com (Mark Johnson)
Subject: Need help with this syntax?
Message-Id: <907026CC9markjohnsononfiberco@24.28.95.186>


I saw this in a perl script.  How do I read it?

open(TR,"/usr/sbin/traceroute $host 2>&1|") || die "Error";
while(<TR>) {
  if ( $_ !~ /interface/i ) {
    print;
    print "<br>";
  }
}

My question specifical is about the:

 2>&1| 

and the

  if ( $_ !~ /interface/i ) {
    print;
    print "<br>";
  }


I understand that the script issues the traceroute command and redirects 
the output to a file handle (TR) and then loops while not EOF on TR and 
prints out each line, but I don't know the PERL way of saying this...



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

Date: Sun, 25 Mar 2001 09:22:18 -0800
From: Mark Thompson <mark-lists@webstylists.com>
Subject: Re: Partial Apology to Perl Fans
Message-Id: <l6asbt8p6phb49ibjjgj89likbqnhn2i2v@4ax.com>

On 12 Feb 2001 14:30:11 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
Siegel) wrote:

> <topmind@technologist.com> wrote in comp.lang.perl.misc:
>>Dear Perl Fans,
>>
>>A couple of years ago I started a "criticisms of Perl" rant on the
>
>Wow!  That's pre-historic by usenet standards.

I don't know, I started a thread which showed my ignorance of
mathematics in sci.mathematics (I think) about 4 years ago and it was
still active about 2 1/2 years later when I went back there to lurk (I
traced the thread back through deja news.) 


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

Date: Sun, 25 Mar 2001 18:07:00 -0500
From: "ganesh" <ganesh@gcol.com>
Subject: passwd change from cgi-script
Message-Id: <99lt6k$152$1@allnight.news.cais.net>

We're trying to use a cgi-script to change passwords from the unix
/etc/passwd file.  However, the passwd command prompts the user
and  I need for it  to recognize that the input is being "piped" to it
rather
than prompting for it.  Does anyone have any suggestions.

thanks.




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

Date: 25 Mar 2001 16:25:08 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Perl and OS X (was Re: Good Perl Code Syntax Highlighting Editor for Linux??)
Message-Id: <99l654$bbv$0@216.155.33.37>

In article <m1k85eq6at.fsf@halfdome.holdit.com>,
 merlyn@stonehenge.com (Randal L. Schwartz) wrote:

 | Yeah, emacs 20.7 even ships "out of the box" on MacOS X!  Whee!
 | (So does apache with mod_ssl and mod_perl, and Perl 5.6.)

woah. =8) 

 | Just another guy standing in line friday at midnight, :)

heheheh

I'm really looking forward to playing with Perl natively on OS X .. now 
that you've had a bit of time to play with it, what do you think? Also, 
is it 5.6.0 or a later version?

-- 
send mail to webmaster (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Sun, 25 Mar 2001 16:29:42 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Perl and OS X (was Re: Good Perl Code Syntax Highlighting Editor for Linux??)
Message-Id: <x7zoe9zua4.fsf@home.sysarch.com>

>>>>> "SRG" == Scott R Godin <webmaster@webdragon.unmunge.net> writes:

  SRG> I'm really looking forward to playing with Perl natively on OS X
  SRG> .. now that you've had a bit of time to play with it, what do you
  SRG> think? Also, is it 5.6.0 or a later version?

there is no later version of perl to be had (yet). 

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: 25 Mar 2001 16:57:58 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Re: Perl and OS X (was Re: Good Perl Code Syntax Highlighting Editor for Linux??)
Message-Id: <99l82m$bbv$2@216.155.33.37>

In article <x7zoe9zua4.fsf@home.sysarch.com>,
 Uri Guttman <uri@sysarch.com> wrote:

 |   SRG> I'm really looking forward to playing with Perl natively on OS X
 |   SRG> .. now that you've had a bit of time to play with it, what do you
 |   SRG> think? Also, is it 5.6.0 or a later version?
 | 
 | there is no later version of perl to be had (yet). 

oh? hm, I guess I was under the mistaken impression that 5.6.1 had been 
released in other than testing and patch phases. carry on. :)

-- 
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw"; 
# ( damn spammers. *shakes fist* take a hint. =:P )


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

Date: Sun, 25 Mar 2001 18:40:31 +0100
From: "Chris Eason" <chris@cake.clara.net>
Subject: Perl public key encryption
Message-Id: <n4qv6.49217$g63.6481200@nnrp3.clara.net>

Hello. I wonder if anybody could please help me with the following problem.

I am developing a website using the free 'PerlShop' program. The only flaw
is that it creates unencrypted files on the webserver which contain order
details, including name, address and credit card number. Clearly, this is
rather unsatisfactory because:

a) anybody with the root password at my ISP would be able to read the files
b) if somebody managed to crack my password they would be able to read the
files

I am therefore trying to find a way, in Perl, to encrypt this information
with a public key before it is written to disc. It has to be a public key
system since anybody who can read the order files would also be able to read
the Perl program and work out how they were encrypted. A symmetric cipher is
therefore inappropriate.

I have found the Crypt::RSA module on CPAN, which appears to be ideal.
However, I am developing the site on my Windows PC at home and it appears to
be impossible to get Crypt::RSA to work in this environment because of its
dependence on PARI. You might therefore ask why don't I just test it on my
ISP's webserver. The answer is that I have not yet forked out the cash for a
properly hosted web site with my ISP because I want to check it all works
first. So I'm in a bit of chicken and egg situation.

Does anybody out there know of a more simple way of performing public key
cryptography in Perl? (My ISP has already said that they do not provide PGP
because 'it would require root access'.) There are other pure Perl
encryption modules like Crypt::RC4 that work perfectly and which are simple
to install and to use... but which are symmetric ciphers. It seems quite
extraordinary that nobody has written a public key asymmetric cipher module.
Am I missing something really basic?

Help!

Thanks

Chris Eason





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

Date: 25 Mar 2001 20:31:52 +0100 (BST)
From: Ross Younger <news04@crazyscot.com>
Subject: Re: Perl public key encryption
Message-Id: <i+d*Qh5Ro@news.chiark.greenend.org.uk>

Chris Eason <chris@cake.clara.net> rearranged some electrons into article
<n4qv6.49217$g63.6481200@nnrp3.clara.net> thus:

>I am developing a website using the free 'PerlShop' program....
>a) anybody with the root password at my ISP would be able to read the files
>b) if somebody managed to crack my password they would be able to read the
>files
>I am therefore trying to find a way, in Perl, to encrypt this information
>with a public key before it is written to disc.

(I presume you're talking about a managed web service arrangement, along
the lines of you supplying HTML, CGIs, whatever to the ISP and they put
your files (along with those of their other customers) on a single or
load-balanced web server.)

This doesn't answer your question, but...

You quite rightly point out that anybody with the root password to the web
server could read your data files.  (I am presuming that customer data
will be transmitted over SSL (https) so there's no problem of traffic
sniffing en route.)  I observe that anybody with the root password
would surely be in a position to compromise the web server itself, or
tamper with your CGIs -- the encrypted data from the remote browser has
to be decrypted at some point, and it could plausibly be copied then by
an evildoer.  (Admittedly, that attack probably takes more effort than
simply reading your data files.)

I don't think I'm trying to talk you out of this setup :-); what you
describe *is* a difficult problem to solve. Recent literature touts
security as being relative; if you're harder to attack than the next guy,
certain classes of attacker will pass you over.  There exists a point
where it's probably more useful to perform a detailed risk assessment
than spend (some might say waste) time reviewing every last technical
detail in pursuit of potential security holes.  Hey, if you're /that/
paranoid, why are you listening to me? :-)


Ross

-- 
Ross Younger    news#N@crazyscot.com (if N fails, try N+1)


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

Date: Sun, 25 Mar 2001 14:27:27 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Print "tar" Success or Failure
Message-Id: <slrn9bshkv.10g.tadmc@tadmc26.august.net>

BUCK NAKED1 <dennis100@webtv.net> wrote:
> 
>> peter.sundstrom-eds@eds.com 
>> *All* Unix commands return a status 
>> code. They do *not* return nothing for 
>> success, they generally return 0. 
>
>Thank You!!! That's one of the first things that I needed to know. Now
>why didn't someone just say that as plainly as you did? :) 


If you had asked what tar returns in a Unix newsgroup, someone
probably _would_ have told you that.

tar is not Perl, so you should not expect help with tar in the
Perl newsgroup.


Yet another good reason to ask questions in the right newsgroup :-)

( though it can sometimes be hard to figure out if you have a Unix
  or Perl or CGI question.
)

-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 25 Mar 2001 16:42:44 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Re: Read from file into hash
Message-Id: <99l764$bbv$1@216.155.33.37>

In article <slrn9bmapv.dtp.abigail@tsathoggua.rlyeh.net>,
 abigail@foad.org (Abigail) wrote:

 | || I have a text file with a pair of words separated by the "or" bar
 | || on each line as follows:
 | || 
 | || Fruits|apple
 | || Fruits|pear
 | || Fruits|orange
 | || Fruits|peach
 | || Animals|cat
 | || Animals|dog
 | || Animals|mouse
 | || Birds|sparrow
 | || Birds|crow
 | || Birds|cardinal
 | || Car|Ford
 | || 
 | || etc.
 | || 
 | || 
 | || I need to read in the pairs and assign them to a hash
 | || as follows:
 | || 
 | || %thehash = ( "Fruits"    => ["apple","pear","orange","peach"],
 | ||              "Animals"   => ["cat","dog","mouse"],
 | ||              "Birds"     => ["sparrow","crow","cardinal"],
 | ||              "Car"       => ["Ford"]
 | ||            );
 | || 
 | 
 | 
 | Well, that is nice. What do you have so far, or are you just using
 | this group to have someone do you homework for you?

one could of course be so kind as to simply point the user to 

    perldoc perlref
            perllol
            perldsc

and inform him that if he studies it long enough, epiphany will follow, 
rather than *just* insulting him, no? 

to the OP: if this is indeed homework, then take a hint and study the 
above three perldocs. enlightenment[1] is just a few keystrokes away ;) 


[1] ZenCrafters : Total Enlightenment, in about an hour.

-- 
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw"; 
# ( damn spammers. *shakes fist* take a hint. =:P )


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V10 Issue 563
**************************************


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