[9130] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2748 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 28 13:07:47 1998

Date: Thu, 28 May 98 10:00:33 -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, 28 May 1998     Volume: 8 Number: 2748

Today's topics:
        "ref($proto) || $proto" considered harmful (was Re: OO  <merlyn@stonehenge.com>
    Re: "ref($proto) || $proto" considered harmful (was Re: <zenin@bawdycaste.org>
    Re: "ref($proto) || $proto" considered harmful (was Re: <tchrist@mox.perl.com>
    Re: Advanced Perl Programming Book <ajohnson@gpu.srv.ualberta.ca>
    Re: c.l.p.misc is `perl support' (was Re: O'Reilly has  (Tina Marie Holmboe)
    Re: Can anybody help me with a quick perl question <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: CGI's slow/Sol2.6/Perl5 (brian d foy)
    Re: Clearly define "free software" (Chris Nandor)
    Re: Clearly define "free software" (Leslie Mikesell)
    Re: Copylefting manuals (Leslie Mikesell)
    Re: Copylefting manuals (Leslie Mikesell)
    Re: Copylefting manuals (Chris Nandor)
        Do pack/unpack Know About Memory Alignment james.p.williams@usahq.unitedspacealliance.com
    Re: Does Perl have a IDE?I don't like command line. <dk@tundra.winternet.com>
    Re: Don't Know how to decrypt using PERL (Kevin Reid)
    Re: Don't Know how to decrypt using PERL (brian d foy)
    Re: file size with perl and win NT <suthsc@ncs.com>
    Re: hash keys order returned by keys() reproducible ? (M.J.T. Guy)
    Re: Have we got a good free Perl manual? (Tina Marie Holmboe)
    Re: Have we got a good free Perl manual? (Tina Marie Holmboe)
    Re: Have we got a good free Perl manual? <hp@pobox.com>
    Re: Have we got a good free Perl manual? (Tina Marie Holmboe)
    Re: Have we got a good free Perl manual? (Greg Lindahl)
        help on stat <slitherland@mco.edu>
        How can I catch a segv, etc. in a process created from  <bjs@iti-oh.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 28 May 1998 15:22:33 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: "ref($proto) || $proto" considered harmful (was Re: OO - explicit package name required)
Message-Id: <8czpg2774c.fsf@gadget.cscaper.com>


>>>>> "Frank" == Frank L Quednau <quednauf@nortel.co.uk> writes:

Frank>   my $proto= shift;
Frank>   my $class = ref($proto) || $proto;

Please don't type those lines until you know exactly what it does,
exactly why you would want to use it, and exactly when you would not
want to use it (which is most of the time).

An instance method named "new" will confuse most seasoned
object-oriented programmers and make you look like a beginner OOPer.

And yes, you probably cut-n-pasted it from either the Camel or "man
perltoot".  I disagree with both, as do most of my OOP friends.

Help stamp out cargo-cult programming.  Those line should read:

	my $class = shift;

There.  Simple.  Much less magic to figure out.  You now have a class
method called "new", and it doesn't work with instances.  For instance
cloning, create a different method called "clone" or "copy", or just
call:

	(ref $instance)->new(@parms)

to invoke the class method again.

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 96 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: 28 May 1998 16:34:11 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: "ref($proto) || $proto" considered harmful (was Re: OO - explicit package name required)
Message-Id: <896373685.664715@thrush.omix.com>

Randal Schwartz <merlyn@stonehenge.com> wrote:
: >>>>> "Frank" == Frank L Quednau <quednauf@nortel.co.uk> writes:
: Frank>   my $proto= shift;
: Frank>   my $class = ref($proto) || $proto;
: Please don't type those lines until you know exactly what it does,
: exactly why you would want to use it, and exactly when you would not
: want to use it (which is most of the time).

	Err, huh?  Why would this ever be a problem?  Under what
	conditions?  At least to me, it makes perfect sense
	that:
		$anotherLego = $lego->new();

	New() is expected to exist by convention, however clone() and
	copy() as you suggest, are not.  It translates well to me as, "I
	have this $toy, please make me a new() one that looks just like
	it".

: An instance method named "new" will confuse most seasoned
: object-oriented programmers

	So does the concept of reusable functions...  I don't
	think I'd ever blink because an "OOPer" might get confused
	with something I do.

: and make you look like a beginner OOPer.

	Most (but not all, I'll admit) "seasoned" OOPers I've hand
	the displeasure of working with get far too hung up on OO dogma
	to see stright.  If they want to sit in a corner and laugh
	at my reusable cloneing methods let them laugh, I've got work
	to do.

: And yes, you probably cut-n-pasted it from either the Camel or "man
: perltoot".  I disagree with both, as do most of my OOP friends.

	And I disagree with most of my OOP friends who freakout when
	I tell them they would do very well to cut there 20k (no, that's
	not made up...) set/get calls and do the access directly.

	OOP is fine, Overly OOP is a plage on the land...

: Help stamp out cargo-cult programming.  Those line should read:
: 	my $class = shift;
: There.  Simple.  Much less magic to figure out.

	What magic?

:  You now have a class
: method called "new", and it doesn't work with instances.

	You say this like it's a Good Thing[tm].  I don't agree.

: For instance
: cloning, create a different method called "clone" or "copy",

	Unexpected, redundant, and confusing.  Why build another
	constructor when you've got a perfectly good one already
	made?  Doesn't that go directly against the very heart
	of OOP dogma?

: or just call:
: 	(ref $instance)->new(@parms)
: to invoke the class method again.

	Vary, very clunky interface to hand a user when it need not be.
	How is this any better then $foo = $bar->(@parms)?  It does
	the same thing, it's just much harder to read.

	Sorry Randal, I'm normally am in full agreement with you, but this
	IMO is almost silly.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 28 May 1998 16:49:31 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: "ref($proto) || $proto" considered harmful (was Re: OO - explicit package name required)
Message-Id: <6kk4ir$2tg$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Randal Schwartz <merlyn@stonehenge.com> writes:
:An instance method named "new" will confuse most seasoned
:object-oriented programmers and make you look like a beginner OOPer.

No, it just means you haven't been tainted by other language's
restrictions.

Anyway, one should call constructors "gimme", not "new".

--tom
-- 
    "Yes, you can think of almost everything as a function, but this may upset
    your wife." --Larry Wall


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

Date: Thu, 28 May 1998 10:08:42 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Advanced Perl Programming Book
Message-Id: <356D7DFA.63FC4F6E@gpu.srv.ualberta.ca>

Christopher R. Redinger wrote:
!
! Okay, I've searched the FAQ, I've read the groups, and I can't
! seem to find the answer to this FAQ (at least around here). We've
! got the "Camel Book," we've got the "Llama Book," heck we've even
! got the "Hip Owls" book. The question of the month around here as
! been, what the heck is on the cover of Advanced Perl Programming
! by O'Reilly?? We've been calling it the "Puma Book." But, I'm not
! too sure about the accuracy of that one. Any ideas?

RTFC :-)
The Colophon pegs it as a 'black leopard' ... also known as a
'black panther' --- the latter term seems to be the more
common term when referring to the 'panther book'.

As for accuracy, 'puma' refers to "Felis concolor", also known as
the cougar or mountain lion, a new world cat.  Unfortunately,
these cats have also been called 'panthers' by American hunters.
The Panther, "Panthera pardus", is an old world cat...apparently,
the name leopard at one time was supposed to refer to a somewhat
mystical hybrid of a lion ("Panthera leo") and a panther--- leo +
pard --- but has long since come to be associated with just the
panther, though some still reserve the name leopard for the
larger varieties of panthers.

So, the animal on APP is a leopard or panther, but not a puma.
 
! Oh yeah, and shouldn't this be added to the FAQ? ;)

it doesn't seem to be a very 'frequent' question.

regards
andrew


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

Date: 28 May 1998 15:09:34 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: c.l.p.misc is `perl support' (was Re: O'Reilly has helped promote the acceptance of Perl)
Message-Id: <6kjune$b8t$4@news1.sol.no>

In article <8c1ztfa980.fsf@gadget.cscaper.com>,
	Randal Schwartz <merlyn@stonehenge.com> writes:

>>>>>> "David" == David Adler <dha@panix.com> writes:
> 
> David> I don't believe it.  *You* need *help*?  ;-)
> 
> Well, at least, that's what many people tell me. :-)

  Ah, but we *were* debating *technical* issues here .... *winks*

-- 
						- TmH


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

Date: 28 May 1998 18:07:45 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
To: directors@when-it-matters.demon.co.uk
Subject: Re: Can anybody help me with a quick perl question
Message-Id: <7x67iqidke.fsf@beavis.vcpc.univie.ac.at>

Re: Can anybody help me with a quick perl question, When
<directors@when-it-matters.demon.co.uk> said:

When> webmaster@surrey-info.com

When> Is the - some sort of special character in perl and if
When> so how do Iet around this.

When> P.S. I have tried using the \ before the -

Right idea, wrong character :-)

I presume you're using perl5 of some description.

You need to escape the `@' otherwise perl thinks you might
be trying to use an array variable.

    my @addr = "webmaster\@surrey-info.com";

Look at the docs for `diagnostics' and `strict' and the `-w'
flag to the perl interpreter - these help you pick up such
problems quickly.  The CGI module (standard with perl5) also
helps a lot for writing perl CGI tools.

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"You see? You see? Your stupid minds! Stupid! Stupid!" ~ Eros, Plan9 fOS.


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

Date: Thu, 28 May 1998 12:44:17 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: CGI's slow/Sol2.6/Perl5
Message-Id: <comdog-ya02408000R2805981244170001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6kj7kh$c0e$1@nnrp1.dejanews.com>, wkessler@my-dejanews.com posted:

>I can't believe that an E450 with twice as much ram and CPU speed can be
>totally beaten by an ultra2!  Something must be wrong with Perl or the
>libraries it links against on Solaris 2.6.
>
>Has anyone else experienced this? Does anyone have any suggestions?  I've
>tried everything I can think of!

is it a problem with the CPU load or the available TCP connections?  if
you've just upgraded, you might have forgot to tune the TCP parameters
and such.

haven't tried a Netscrape server, but haven't had problems with 
Stronghold on a similiar set-up.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers T-shirts! <URL:http://www.pm.org/tshirts.html>


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

Date: Thu, 28 May 1998 15:17:57 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Clearly define "free software"
Message-Id: <pudge-2805981112220001@dynamic265.ply.adelphia.net>

In article <6ki500$76j@news.service.uci.edu>, ehood@geneva.acs.uci.edu
(Earl Hood) wrote:

# My impression of much proprietary/commercial software is that it
# actually promotes the "dumbing down" of users.

About the same percentage of freeware does, too.


# I lost count of the
# times I got completed frustrated with M$/Windows software when it goes
# at lengths to hide stuff that it "believes" I should not know about, or
# automatically performs actions cause it thought that is what I wanted
# (when I really didn't).  I am getting the suspicion that software is
# purposely developed this way to keep users from thinking and
# considering a very important question: "Is there a better way to do
# this?".

So?  Why should most software NOT hide things?  Most software is used by
people who WANT things hidden because they wouldn't know what to do with
them if they weren't.  The software does not dumb-down the users, it meets
them at the level they are already at.  They are "dumb".  They should be
treated as dumb.

Get used to it.  Unless everyone in the world become professional computer
users, this is not going to change.  I don't need to know how my engine
works to drive my car.  I am glad that I have computers inside it telling
me what is right and wrong and what to do.  And I don't want to have to
assemble the engine before I start driving it.

Guess what?  This software that hides all this stuff may not be for you. 
So what is wrong with that?

I can't understand this "this software is too dumb for me, so it sucks and
no one should use it" mentality.  There is nothing wrong with "one-button
Internet access".  I wouldn't use it for me, but I would have my dad use
it.

I am all in favor of software that does NOT assume someone is dumb.  Maybe
in the future, more software will come with user levels or something.  But
the idea that all software should work best for all users is nonsense.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: 28 May 1998 10:22:53 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Clearly define "free software"
Message-Id: <6kjvgd$mo3$1@Mercury.mcs.net>

In article <m2yavmu1my.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>,
David Kastrup  <dak@mailhost.neuroinformatik.ruhr-uni-bochum.de> wrote:
>
>Because there is no integrated word processing system producing
>consumer level quality with consumer level stability around at
>consumer level price.  So one has to make do with components (editor,
>typesetter, etc) that are available with consumer level quality at
>consumer level prices.

Lots of people get by with MSWord or WordPerfect.  In which category
do you think they miss the mark?

>> No, you're not a typical consumer. What do you use to write your
>> letters to the editor, or to your parents, or your reports for your
>> boss? If you say that you use LaTeX, you're not a typical consumer.
>
>My girl friend is doing her text processing needs with LaTeX, and gets
>them done typically faster and at a higher quality level than others.
>Of course, if "consumer level" means a person not using LaTeX by
>definition, we can save ourselves a lot of discussion.  LaTeX will
>never become consumer quality then, because if you use it, you are
>automatically no longer a consumer.

If she gets behind, can she call up an office temp agency and find
someone capable of catching up in a day?

   Les Mikesell
    les@mcs.com


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

Date: 28 May 1998 09:56:30 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Copylefting manuals
Message-Id: <6kjtuu$m98$1@Mercury.mcs.net>

In article <IO%a1.29$443.900243@cam-news-reader1.bbnplanet.com>,
Barry Margolin  <barmar@bbnplanet.com> wrote:
>In article <87solxoi5b.fsf@io.oryxsoft.com>, Paul Fisher  <rms@gnu.org> wrote:
>>One other limit on your flexibility is that you can't stop people from
>>copying small examples no matter what you say.  Small quotations from
>>a book are "fair use"; people don't need special permission for them.
>
>I wish a lawyer would join the discussion and say whether the above is
>really true.  As I've posted elsewhere, my lay understanding of "fair use"
>is that it's not so liberal.  Besides being small quotations, fair use also
>specifies the type of use you make of it, and I'm not sure that
>incorporating examples into a program falls into its limits.

Are you suggesting that if we purchase a book specifically for the
purpose of learning the *exact* technique for some procedure
we are then prohibited from using it?

>Brad Templeton's Copyright Myths FAQ has this to say about fair use:
>
>        Fair use is a complex doctrine meant to allow certain valuable
>        social purposes.  Ask yourself why you are republishing what
>        you are posting and why you couldn't have just rewritten it
>        in your own words.

Rewriting a program chunk means you have to test everything again and
there is no reason to expect it to work.  After all, if you knew how
to do it yourself you wouldn't have bought the book.  There is certainly
value in using previously tested code.

  Les Mikesell
    les@mcs.com


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

Date: 28 May 1998 10:01:29 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Copylefting manuals
Message-Id: <6kju89$mb3$1@Mercury.mcs.net>

In article <pudge-2805980752150001@dynamic265.ply.adelphia.net>,
Chris Nandor <pudge@pobox.com> wrote:
>In article <IO%a1.29$443.900243@cam-news-reader1.bbnplanet.com>, Barry
>Margolin <barmar@bbnplanet.com> wrote:
>
># In article <87solxoi5b.fsf@io.oryxsoft.com>, Paul Fisher  <rms@gnu.org> wrote:
># >One other limit on your flexibility is that you can't stop people from
># >copying small examples no matter what you say.  Small quotations from
># >a book are "fair use"; people don't need special permission for them.
># 
># I wish a lawyer would join the discussion and say whether the above is
># really true.  As I've posted elsewhere, my lay understanding of "fair use"
># is that it's not so liberal.  Besides being small quotations, fair use also
># specifies the type of use you make of it, and I'm not sure that
># incorporating examples into a program falls into its limits.  The web page
># <http://www.benedict.com/fairtest.htm> describes the factors that are now
># considered when deciding whether use is fair.  "Relative amount" is just
># one of the four factors listed there.
>
>You are absolutely correct.  If I publish a book of my own algorithms,
>which I invented and copyrighted and are fantastic and new to the world, I
>can require that you don't use them in a program for sale.  However, that
>would most likely fall under patent law.  You can't copyright an idea, you
>have to patent it.  And since the code would likely not be used verbatim,
>copyright law probably would not have much to say on the matter.

I don't understand why you would not want your code to be used as
close to verbatim as possible.  If people make arbitrary changes
they are likely to screw it up, resulting in bad publicity about
your code which isn't actually to blame.  Unless, of course, you
publish something without actually testing it first...

  Les Mikesell
     les@mcs.com


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

Date: Thu, 28 May 1998 15:20:00 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Copylefting manuals
Message-Id: <pudge-2805981114250001@dynamic265.ply.adelphia.net>

In article <6kju89$mb3$1@Mercury.mcs.net>, les@MCS.COM (Leslie Mikesell) wrote:

# >You are absolutely correct.  If I publish a book of my own algorithms,
# >which I invented and copyrighted and are fantastic and new to the world, I
# >can require that you don't use them in a program for sale.  However, that
# >would most likely fall under patent law.  You can't copyright an idea, you
# >have to patent it.  And since the code would likely not be used verbatim,
# >copyright law probably would not have much to say on the matter.
# 
# I don't understand why you would not want your code to be used as
# close to verbatim as possible.  If people make arbitrary changes
# they are likely to screw it up, resulting in bad publicity about
# your code which isn't actually to blame.  Unless, of course, you
# publish something without actually testing it first...

Les, meet Point.  Point, meet Les. :)

This has nothing to do with whether or not someone would want their
examples to be used.  Motive and desire is irrelevant to this discussion.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Thu, 28 May 1998 16:40:59 GMT
From: james.p.williams@usahq.unitedspacealliance.com
Subject: Do pack/unpack Know About Memory Alignment
Message-Id: <6kk42r$hhs$1@nnrp1.dejanews.com>

I have a C++ GUI that communicates with a C++ simulation using sockets or
shared memory.  The API between them is complex, involving a large number
of structs containing native data types, nested structs, variable length
arrays, etc.

It would be really great if I could write a perl module that can replace
the GUI.  How can I fill the structs when sending and access fields from
them when receiving?  The only solutions I know of are:

   1) Use pack/unpack.  Do these functions know how to pad to satisfy
      memory alignment restrictions?

   2) Write C++ code with a perl wrapper.

Is there a better way?

TIA,

Jim Williams

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 28 May 1998 16:11:34 GMT
From: Dave Kenny <dk@tundra.winternet.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6kk2bm$r2n$1@blackice.winternet.com>

Writing a better documentation grepper is an interesting idea.  But I
must confess that I've only rarely looked at Perl's online documentation.
Instead I carry the "Camel Book" back and forth, every day.  (real name:
Programming Perl, by Larry Wall, Tom Christiansen & Randall Schwartz,
published by O'Reilly & Associates.)

The "There's More than One Way to Do It" property of Perl makes it easy
to be lazy and use only a subset of Perl.  When boredom or guilt prods
me to start using new (to me) features, I like being able to curl up with
the book, scribble in the margins etc.  For learning or studying things
I find books much more congenial than CRT screens.

OTOH when forced to deal with VisualBasic, Office, and the like, I seem
to spend my life drowning in the not-so-helpful online "help".  Here I
_would_ make heavy use of all those wonderful unixy tools, but of course
the stuff is all encrypted in Micro$oft's goofy formats.

I haven't felt the _need_ for heavy power tools to cope with Perl, because
Perl makes sense, is well thought out, and has a lot of regularity in
spite of its eclecticism.

As for this observation:

	Despite the confusion of the webblies, Perl has never been
	nor ever shall be a consumerist toy for the programmatically
	challenged.  It is a power ...

I think something more pernicious than being "programmatically 
challenged" is going on.  I think the real "problem" people have with
Perl is the same as with Unix, or Forth, or Lisp, or Smalltalk...
"It looks funny."   That it invites a new-and-better mindset is, I think,
more of a scapegoat than a real hurdle.

Perl is IMHO no more difficult than Basic or any other programming
language.  Sure, there's a lot there, but you can get a lot of milage
from a fairly small subset.  Even the "programmatically challenged"
should be able to master a useful subset without heroic efforts.
I think the real obstacle is bigotry.
 

Tom Christiansen <tchrist@mox.perl.com> wrote:
<snip>
: I recommend using things like find+grep, or tcgrep, or linux man with its
: -K flag, or my man with -g or its lqtext support, or agrep with errors,
: or gnu grep with -C, etc.  Then of course there's glimpse, which is
: hard to fault.  The possibilities are limited only by the imagination
: of the programmer.  The system is replete with power tools just waiting
: for your attention.  It is risible in the extreme that you're talking
: about how ostensible difficult it is to locate information in the Perl
: documentation, considering of course that facile manipulation of text
: and files is the heart and soul of Perl itself.  Amongst the first
: programming task for every Perl programmer should be to write a better
: perl documentation grepper.  If they can't do that, they don't get to
: write in Perl.  It's like those "you must be this tall" bars at amusement
: parks.  Those who cannot cope with Perl's documentation don't deserve it.

: Despite the confusion of the webblies, Perl has never been nor ever shall
: be a consumerist toy for the programmatically challenged.  It is a power
: programming tool, made by programmers for programmers.  Nonprogrammers
: should stop complaining that it doesn't fit their worldview.  It isn't
: supposed to.

: --tom
: There is a need to keep from being locked into Open Systems. --IBM sales rep


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

Date: Thu, 28 May 1998 11:28:05 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Don't Know how to decrypt using PERL
Message-Id: <1d9plpi.cto6hok4lup8N@slip166-72-108-10.ny.us.ibm.net>

Kevin Buhr <buhr@stat.wisc.edu> wrote:

> > result = crypt(plaintext , salt) ;
> 
> What you call "plaintext" is actually the DES *key*.  (The real
> plaintext is the known string of 8 zeroes).  There is no known "easy"
> way to recover a DES key from such a small sample of ciphertext, even
> when you know the plaintext, like you do here.

What is the purpose of the salt?

-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.


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

Date: Thu, 28 May 1998 12:54:00 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Don't Know how to decrypt using PERL
Message-Id: <comdog-ya02408000R2805981254000001@news.panix.com>
Keywords: from just another new york perl hacker

In article <1d9plpi.cto6hok4lup8N@slip166-72-108-10.ny.us.ibm.net>, kpreid@ibm.net (Kevin Reid) posted:

>Kevin Buhr <buhr@stat.wisc.edu> wrote:
>
>> > result = crypt(plaintext , salt) ;

>What is the purpose of the salt?

see the man page for crypt(3) which (definatively) explains all of this.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers T-shirts! <URL:http://www.pm.org/tshirts.html>


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

Date: 28 May 1998 11:23:39 -0500
From: Scott Sutherland <suthsc@ncs.com>
Subject: Re: file size with perl and win NT
Message-Id: <uvhqqz7n8.fsf@ncs.com>

vasile@club-internet.fr (Vasile CALMATUI) writes:

> mgjv@comdyn.com.au (Martien Verbruggen) wrote:
> 
> It is a file made by the a mail reader program (Eudora Light).
> It's composed of text mails separated by 2-3 binary caracters.
> But why binary caracters can make life hard to Perl on Win32 ?
> 

Beacuse MS-DOS makes a distinction between binary files and text
files.

perldoc -f binmode

    binmode FILEHANDLE
            Arranges for the file to be read or written in "binary"
            mode in operating systems that distinguish between
            binary and text files. Files that are not in binary mode
            have CR LF sequences translated to LF on input and LF
            translated to CR LF on output. Binmode has no effect
            under Unix; in MS-DOS and similarly archaic systems, it
            may be imperative--otherwise your MS-DOS-damaged C
            library may mangle your file. The key distinction
            between systems that need binmode and those that don't
            is their text file formats. Systems like Unix and Plan9
            that delimit lines with a single character, and that
            encode that character in C as '\n', do not need
            `binmode'. The rest need it. If FILEHANDLE is an
            expression, the value is taken as the name of the
            filehandle.

Another thing that you have to watch out for is C-z characters in text
files.  C-z used to delimit EOF for DOS, and it still hangs around in
some programs/libraries.

HTH,

Scott

-- 
Scott Sutherland                          National Computer Systems
(319) 354-9200                        Measurement Services Division
<mailto:sut92199@ncs.com>                             Iowa City, Ia
#include "standard-disclaimer.h"


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

Date: 28 May 1998 16:13:25 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: hash keys order returned by keys() reproducible ?
Message-Id: <6kk2f5$g48$1@lyra.csx.cam.ac.uk>

Bruno LACROIX  <blacroix@soleil.biomerieux.fr> wrote:
>First, I've always believed that the order in which a hash's keys are
>returned by keys() is identical as long as the hash itself is the same;

That should be true.   It's documented under perldoc -f keys:

=item keys HASH

Returns a normal array consisting of all the keys of the named hash.  (In
a scalar context, returns the number of keys.)  The keys are returned in
an apparently random order, but it is the same order as either the
                                      ^^^^^^^^^^^^^^
values() or each() function produces (given that the hash has not been
modified).

Tied hashes might conceivably break this rule.

If you can produce a small self-contained example which contradicts this,
please report it to perlbug.


Mike Guy


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

Date: 28 May 1998 15:06:09 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: Have we got a good free Perl manual?
Message-Id: <6kjuh1$b8t$2@news1.sol.no>

In article <6keobf$be1@news3.newsguy.com>,
	lindahl@pbm.com (Greg Lindahl) writes:

>>   What I *cannot* understand, however, is the fact that there are 3.7 MB
>>   of manual pages distributed with the version of Perl 5.004 installed
>>   locally.
> 
> rms was writing about something that took place many years ago. Perl
> version 5.004 was not available many years ago.

  That is correct. The documentation available for Perl 4 - which I learned
  the language from - was quite excellent.



>>   But perhaps I've gotten this wrong - the man-pages ain't as free as Perl?
> 
> Go check the copyright and license. Then please post carefully as to
> not generate unnecessary flamewars.

  I think not. My question was not answered, and I think that the mood I
  see around me is more than enough for me getting out of this debate.


-- 

						- TmH


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

Date: 28 May 1998 15:07:43 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: Have we got a good free Perl manual?
Message-Id: <6kjujv$b8t$3@news1.sol.no>

In article <rfi1ztg3bhz.fsf@cathcart.sysc.pdx.edu>,

> TMH>   But perhaps I've gotten this wrong - the man-pages ain't as
> TMH> free as Perl?
> 
> perlfaq and perltoot are under a non-commercial and no-modify
> licenses, respectively.  Perl is under the Artistic/GPL license.

  My question does remain: how much do you pay for the man-pages that,
  the first time I looked (1993) and the last time I looked (1998) came
  with Perl ?

  Anyone ?

-- 
						- TmH


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

Date: Thu, 28 May 1998 16:11:55 GMT
From: robert havoc pennington <hp@pobox.com>
Subject: Re: Have we got a good free Perl manual?
Message-Id: <wsnogwi1ik4.fsf@harper.uchicago.edu>

tina@scandinaviaonline.se (Tina Marie Holmboe) writes:
> 
>   My question does remain: how much do you pay for the man-pages that,
>   the first time I looked (1993) and the last time I looked (1998) came
>   with Perl ?
> 

Everyone agrees they are free of cost, that's not what people are
arguing about.

Havoc Pennington ==== http://pobox.com/~hp


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

Date: 28 May 1998 16:49:02 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: Have we got a good free Perl manual?
Message-Id: <6kk4hu$cu4$2@news1.sol.no>

In article <wsnogwi1ik4.fsf@harper.uchicago.edu>,
	robert havoc pennington <hp@pobox.com> writes:

>>   My question does remain: how much do you pay for the man-pages that,
>>   the first time I looked (1993) and the last time I looked (1998) came
>>   with Perl ?
>> 
> 
> Everyone agrees they are free of cost, that's not what people are
> arguing about.

  Good, then: we (all) agree that there are *good* Perl manuals which can
  be had for no cost at all - free.

  Pardon me, Sir, for then not having the faintest clue as to what is
  being debated. Is it possible that someone actually wants to have good,
  free (no cost) and 'free' Perl documentation, where the latter means that
  anyone is able - and allowed - to fubar the same documentation ?


  I must have misunderstood something along the way - care to point out to
  me in vivid detail exactly what never stuck up here ? *taps her forehead*

-- 
  Tina Marie Holmboe                
  Application Developer (Geeks'R'Us)         [tina@tech.scandinaviaonline.se]
  Scandinavia Online AB Development Dept.    (+46) 08 587 81000 (switchboard)
                                             (+46) 08 587 81189 (direct)


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

Date: 28 May 1998 16:09:35 GMT
From: lindahl@pbm.com (Greg Lindahl)
Subject: Re: Have we got a good free Perl manual?
Message-Id: <6kk27v$240@news1.newsguy.com>

tina@scandinaviaonline.se (Tina Marie Holmboe) writes:
> In article <rfi1ztg3bhz.fsf@cathcart.sysc.pdx.edu>,
> 
> > TMH>   But perhaps I've gotten this wrong - the man-pages ain't as
> > TMH> free as Perl?
> > 
> > perlfaq and perltoot are under a non-commercial and no-modify
> > licenses, respectively.  Perl is under the Artistic/GPL license.
> 
>   My question does remain: how much do you pay for the man-pages that,
>   the first time I looked (1993) and the last time I looked (1998) came
>   with Perl ?

You seem to be assuming that people are only talking about money when
they say free. As you can see from looking around gnu.misc.discuss,
this is not a very good assumption. The above answer is a precise one,
and it does answer your question.

-- g



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

Date: Thu, 28 May 1998 11:30:34 -0400
From: Sean Litherland <slitherland@mco.edu>
Subject: help on stat
Message-Id: <356D831A.C8A10138@mco.edu>

I am running the stat command and when I look at the file information
which is suppose to have permissions and type of file, it gives me a
large number, which I cannot decifer.  any suggestions on how to decifer
it.  Or is it possibly giving me junk.



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

Date: Thu, 28 May 1998 12:19:57 -0400
From: "Brian J. Sayatovic" <bjs@iti-oh.com>
Subject: How can I catch a segv, etc. in a process created from Perl?
Message-Id: <6kk33c$5ga$1@malgudi.oar.net>

Is there a way to catch, say, a segv, that occurs in a process that is
started by a perl script?  I'd like to monitor the batch of processes my
script starts so I can log such signals.  Right now I'm hoping that its
children will have the same signal handlers as the perl script.

To add another step, I'm trying to get this to work on NT and UNIX.  On NT,
my process is being created with Win32::Process::Create.  Will this
discrepency cause any prroblems as far has handling signals?

Brian.




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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 2748
**************************************

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