[9070] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2686 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 22 11:39:47 1998

Date: Fri, 22 May 98 07:01:37 -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           Fri, 22 May 1998     Volume: 8 Number: 2686

Today's topics:
    Re: a2p chokes on gensub() function <rootbeer@teleport.com>
    Re: constants in perl? (Mike Stok)
    Re: Getting hex codes from string (Mike Stok)
    Re: GNU attacks on the open software community (Ryan McGuigan)
    Re: GNU attacks on the open software community <vroonhof@frege.math.ethz.ch>
    Re: GNU attacks on the open software community (Dave Barr)
    Re: GNU attacks on the open software community (Dave Barr)
    Re: GNU attacks on the open software community (Dave Barr)
    Re: GNU attacks on the open software community (Dave Barr)
    Re: GNU attacks on the open software community <agulbra@troll.no>
    Re: GPL documentation == unspeakable evil (le Fanttme)
    Re: GPL documentation == unspeakable evil (le Fanttme)
    Re: GPL documentation == unspeakable evil (le Fanttme)
    Re: GPL documentation == unspeakable evil (Stuart McDow)
    Re: HELP! Need to make binary exe out of perl script <ahdiii@webspan.net>
    Re: I can't use any modules in FreeBSD! (Gabor)
    Re: Int() gives wrong result <rootbeer@teleport.com>
    Re: LABOR CRISIS: Perl SW Guru NEEDED MA Intranet Start (John Porter)
    Re: liberame <tchrist@mox.perl.com>
    Re: More double standards out of the FSF <ken@bitsko.slc.ut.us>
        Perl indention formatter/standardizer <tf@dymaxion.com>
    Re: Problem de-referencing a reference to a typeglob st (Bob Kline)
        renaming files under NT <sesek@intercortex.com>
        SRC: finding installed modules <tchrist@mox.perl.com>
        SRC: here docs <tchrist@mox.perl.com>
        SRC: Insertion-order hashes <tchrist@mox.perl.com>
        SRC: Matching multiple patterns <tchrist@mox.perl.com>
        SRC: Nesting Subroutines <tchrist@mox.perl.com>
        TIP: watching for disk overruns <tchrist@mox.perl.com>
    Re: TIP: watching for disk overruns <quentin@shaddam.amd.com>
    Re: Tom Christiansen attacks the free software communit (Stefaan A Eeckels)
    Re: Tom Christiansen attacks the free software communit (Tyson Richard DOWD)
    Re: Who cares! (Charlie Stross)
    Re: Why NOT crypt??? <neeri@iis.ee.ethz.ch>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 22 May 1998 13:49:25 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Eric Pement <epement@ripco.com>
Subject: Re: a2p chokes on gensub() function
Message-Id: <Pine.GSO.3.96.980522063408.29577F-100000@user2.teleport.com>

On 22 May 1998, Eric Pement wrote:

>    I'm trying to use the a2p (awk-to-perl) translator to convert a
> GNU awk script which makes extensive use of the gensub() function
> present in gawk 3.0.3.  

As I hear it, a2p was written long before gawk 3.0.3, so it's no surprise
that there are some functions it doesn't know. 

> The a2p program doesn't recognize this function and aborts as soon as it
> meets the first use of the gensub()  function. 

Bummer. Well, I've never heard of a gawk-to-perl translator, but you could
make one. Write it in Perl, of course. :-) 

Or you could just manually re-write your script in Perl, which would
probably be easier. Good luck! 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 22 May 1998 13:25:49 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: constants in perl?
Message-Id: <6k3uct$emd@news-central.tiac.net>

In article <6k3oil$k54$1@lyra.csx.cam.ac.uk>,
M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
>Mike Stok <mike@stok.co.uk> wrote:
>>In recent versions of perl there's a pragmatic module called constant
>>
>>A quck way to tell if it's installed is:
>>
>>  perl -mbanana -e 1
>>
>>which shouldn't complain if it can find the constant module.  
>
>Eh?    I presume you mean
>
>   perl -mconstant -e 1

Yes.  Thanks for spotting that.  I usually try and test "obvious" failure
modes to see which errors, are generated and here I have been caught
cutting the wrong line & pasting it in a reply...  

Mike
-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: 22 May 1998 13:43:34 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Getting hex codes from string
Message-Id: <6k3ve6$emd@news-central.tiac.net>

In article <6k3e05$o9e$1@nuscc.nus.edu.sg>,
Choo Heng Kek <kek@olympus.irdu.nus.sg> wrote:

>I want to read in a string and then print the hex codes of
>each character of the string.
>
>The following is what I do now, but am hoping for more "elegant"
>solutions from perl hackers out there:
>
>    @buf = unpack('C*', $string);
>    while(@buf){ printf "%02x:", shift @buf }
>
>If $string is "abc", the output is "61:62:63".

If you don't care about the colons then you can just say

  $string = 'abc';
  print unpack 'H*', $string;

and it'll print 616263

You could just use a loop to eliminate the explicit temporary array e.g.

  for (unpack 'C*', $string) {
    printf '%02x:', $_;
  }

which produces 61:62:63:

If you don't want the trailing : then one way to do it might be

  print join (':', map {unpack 'H*', $_} split / */, $string);

Hope this helps,

Mike
-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: 22 May 1998 13:14:45 GMT
From: ryan@mail.ramresearch.com (Ryan McGuigan)
Subject: Re: GNU attacks on the open software community
Message-Id: <6k3to5$fqv$1@news12.ispnews.com>

: :Once the guile regexp handling is powerful enough, there won't be any need
: :for perl in GNU-grown stuff anymore. Even the whole perl could one day be 
: :emulated from within guile, the powertool of the gnu generation. 

guile?  What the hell is guile?  Hahaha!  I have to agree with Tom on this
one.

: This is the funniest thing I've heard in a long time.  No one knows about
: guile.  No one cares.  It will never, ever, ever replace Perl.  Mark my
: words.

: --tom
: -- 
:   "It's a cult.  Don't encourage them."
:           --Rob Pike on the FSF


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

Date: 22 May 1998 15:10:26 +0200
From: Jan Vroonhof <vroonhof@frege.math.ethz.ch>
Subject: Re: GNU attacks on the open software community
Message-Id: <bylnrupi2l.fsf@bolzano.math.ethz.ch>

James Youngman <JYoungman@vggas.com> writes:

> Speaking of that, has anyone actually *seen* any documentation
> published under the GPL?  I don't think I have.

Huh? Most gnu stuff comes with documentation  under the same licence
as the software. 

Jan


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

Date: 22 May 1998 13:37:28 GMT
From: barr@cis.ohio-state.edu (Dave Barr)
Subject: Re: GNU attacks on the open software community
Message-Id: <6k3v2o$ml0$1@news.cis.ohio-state.edu>

In article <6k21gs$loh$1@schenectady.netmonger.net>,
 <chris+usenet@netmonger.net> wrote:
>In article <6k1rji$1k8$1@news.cis.ohio-state.edu>,
>Dave Barr <barr@cis.ohio-state.edu> wrote:
>> In article <6k1fdp$ehj$2@schenectady.netmonger.net>,
>>  <chris+usenet@netmonger.net> wrote:
>> >will (quite naturally) say "If you want to support the FSF, buy books
>> >from us instead of from that company".
>> 
>> And have you seen their books?
>
>That's irrelevant.

I realize that.

My point is that documentation deserves a different treatment than source.
It's hard to find any worthwhile extensive documentation that came out
of a hardline-GNU development.  At one time Emacs's was probably the
best, but it's been surpassed by other efforts, especially books.

Stuff like the Linux Documentation Project -- not a GNU effort -- are
probably a good example now.  It is a good try, but it's really really
tough keeping this stuff current.  A large portion of the LDP stuff now
is full of cobwebs.

My point is that RMS's attempts to develop a GPL-free Perl documentation
is a waste of time.  It will flounder and die just like all the others have,
and in the end be no better than the existing Perl docs.  What will
be gained?

--Dave
-- 
http://www.cis.ohio-state.edu/~barr/
barr@cis.ohio-state.edu


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

Date: 22 May 1998 13:39:46 GMT
From: barr@cis.ohio-state.edu (Dave Barr)
Subject: Re: GNU attacks on the open software community
Message-Id: <6k3v72$mld$1@news.cis.ohio-state.edu>

In article <bylnrupi2l.fsf@bolzano.math.ethz.ch>,
Jan Vroonhof  <vroonhof@frege.math.ethz.ch> wrote:
>James Youngman <JYoungman@vggas.com> writes:
>> Speaking of that, has anyone actually *seen* any documentation
>> published under the GPL?  I don't think I have.
>
>Huh? Most gnu stuff comes with documentation  under the same licence
>as the software. 

Which is pretty telling of the quality of the stuff -- it's so poor
nobody remembers it even if they have seen it.

--Dave
-- 
http://www.cis.ohio-state.edu/~barr/
barr@cis.ohio-state.edu


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

Date: 22 May 1998 13:44:31 GMT
From: barr@cis.ohio-state.edu (Dave Barr)
Subject: Re: GNU attacks on the open software community
Message-Id: <6k3vfv$mmk$1@news.cis.ohio-state.edu>

In article <6k2hgd$6dg$5@blue.hex.net>,
Christopher Browne <cbbrowne@hex.net> wrote:
>In contrast, that is obviously *not* in O'Reilly's interests; they
>doubtless prefer to see people getting free software and then having to
>buy documentation *from them.* They can, and indeed *do* make a fairly
>nice business of selling documentation for free software.

That's a far too cynical approach.

O'Reilly's interests are to promote free software.  Why?  Because if
they software wasn't popular then nobody has a reason to buy their
books.   O'Reilly hasn't ever done anything to stifle free documentation,
except by their existence as a company and the books they sell.

O'Reilly has done a pretty good damn job for the free software community.
Without them we'd still be sneaking around using free code behind our
bosses' backs.  Now we can use it because our bosses know that people
like O'Reilly have books about it, and others like Cygnus provide
commercial support.

--Dave
-- 
http://www.cis.ohio-state.edu/~barr/
barr@cis.ohio-state.edu


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

Date: 22 May 1998 13:45:46 GMT
From: barr@cis.ohio-state.edu (Dave Barr)
Subject: Re: GNU attacks on the open software community
Message-Id: <6k3via$mne$1@news.cis.ohio-state.edu>

In article <u1hn2cbtqtz.fsf@mary-kay-commandos.MIT.EDU>,
Thomas Bushnell, n/BSG <tb@mit.edu> wrote:
>I don't recall any GNU people telling Linus that his kernel was
>pointless.  I remember lots of people being quite pleased with it.

I do remember quotes from RMS saying essentially "Linux is interesting,
but the Hurd is the way to go".

--Dave
-- 
http://www.cis.ohio-state.edu/~barr/
barr@cis.ohio-state.edu


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

Date: 22 May 1998 15:39:12 +0200
From: Arnt Gulbrandsen <agulbra@troll.no>
Subject: Re: GNU attacks on the open software community
Message-Id: <m3vhqyctmn.fsf@lupinella.troll.no>

Barry Margolin <barmar@bbnplanet.com>
> IANAL either, but I believe the fair use 
 ..

Sorry, I should have added a paragraph at the end stating the (to me)
obvious:

    Doing stuff that is "maybe", "probably" or "assumedly" legal is a
    bad idea.  If a given license for programming documentation
    doesn't make it perfectly clear that the embedded examples may be
    used for programming, that license needs changing.

Lawyers may feel comfortable walking close to the boundary of what's
legal, but IANAL and non-lawyers should, IMHO, try to remain within
the boundaries of what's indubitably legal.  Pushing the envelope of
fair use is not indubitably legal, and therefore the precise
boundaries of what fair use allows are not very interesting to me.

It's good that Tom intends to clear this up.

--Arnt


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

Date: Fri, 22 May 1998 13:04:47 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: GPL documentation == unspeakable evil
Message-Id: <E64211D945D184A3.7D13DC6A05D2D168.E8D18CF1A3DA7BFA@library-proxy.airnews.net>

On 22 May 1998 02:30:13 -0700, tzs@halcyon.com (Tim Smith) wrote:

>Tom Christiansen  <tchrist@mox.perl.com> wrote:
>>It is imperative that no documentation be placed under the GPL due to its
>>insidious viral nature.  For example, the Perl documentation is meant to
>>be used to take examples from to use in your programs.  We want people
>>to do this.
>
>Add this to your copyright notice:
>
>	"The Perl examples in this documentation are in the public
>	domain".

This would not give enough protection. Public domain is a complete
lack of protection.

-f
-- 
austin ziegler * fantome*@*vnet*.*net   * http://fantome.vnet.net/
---------------* aziegler*@*vcela*.*com * -------------------------
Remove the stars to email me            * Ni bhionn an rath ach
my words my opinions my ideas           * mar a mbionn an smacht
  -- I Argue Ideas, Not Beliefs: Give Up Your Dogma --


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

Date: Fri, 22 May 1998 12:56:31 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: GPL documentation == unspeakable evil
Message-Id: <468D2378E6FB361F.839ABA91D94DC8BC.3197E28C4D0D84D1@library-proxy.airnews.net>

On 22 May 1998 11:36:12 +0200, David Kastrup
<dak@mailhost.neuroinformatik.ruhr-uni-bochum.de> wrote:

 . [Tom Christiansen's] documentation is neither freely redistributable
 . (as it may not be redistributed by free software vendors like RedHat
 . that make a living from doing so), nor freely maintainable as you
 . prohibit any modifications by others.  That means that the destiny
 . of the docs in question is entirely bound to your destiny and the
 . destiny of your interest or capabilites in them.  You can
 . effectively redraw your docs when you stop releasing new versions
 . since they will then in time become outdated.

This is an untrue statement. RedHat *may* distribute it. RedHat *may
not* say "oh, we're including Tom's documents. Let's charge an extra
$50 for the CD because these are so good." Especially if it only costs
a penny to include Tom's documents on a given CD.

-f
-- 
austin ziegler * fantome*@*vnet*.*net   * http://fantome.vnet.net/
---------------* aziegler*@*vcela*.*com * -------------------------
Remove the stars to email me            * Ni bhionn an rath ach
my words my opinions my ideas           * mar a mbionn an smacht
  -- I Argue Ideas, Not Beliefs: Give Up Your Dogma --


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

Date: Fri, 22 May 1998 12:57:14 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: GPL documentation == unspeakable evil
Message-Id: <8CC426A90911BCB8.B7A84B983AC4E68D.7B09F1FF49254515@library-proxy.airnews.net>

On 22 May 1998 11:37:38 +0200, David Kastrup
<dak@mailhost.neuroinformatik.ruhr-uni-bochum.de> wrote:

>fl_aggie@thepentagon.com (I R A Aggie) writes:
>
>> In article <6k1cl6$d6g$1@schenectady.netmonger.net>,
>> chris+usenet@netmonger.net wrote:
>> 
>> +  The
>> + whole POINT of the GPL is to let people write free software and know
>> + that it can never be taken and used in a non-free product.
>> 
>> Then its not really _free_ software, is it?
>
>An American citizen may not be taken as a slave, nor sell himself as
>one.  It seems that he is not really free, then.

An American citizen can, however, choose to work for a profit or a
non-profit group.

-f
-- 
austin ziegler * fantome*@*vnet*.*net   * http://fantome.vnet.net/
---------------* aziegler*@*vcela*.*com * -------------------------
Remove the stars to email me            * Ni bhionn an rath ach
my words my opinions my ideas           * mar a mbionn an smacht
  -- I Argue Ideas, Not Beliefs: Give Up Your Dogma --


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

Date: 22 May 1998 13:39:55 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: GPL documentation == unspeakable evil
Message-Id: <6k3v7b$71e$1@ns1.arlut.utexas.edu>

Tom Christiansen <tchrist@mox.perl.com> writes:
> 
> It occurs to me that the FSF doesn't actually know how the Perl
> developed process really works.

Cathedral vs. Bazaar.   Sort of.

--
Stuart McDow                                     Applied Research Laboratories
smcdow@arlut.utexas.edu                      The University of Texas at Austin
            "Look for beauty in roughness, unpolishedness"


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

Date: Fri, 22 May 1998 09:18:27 -0400
From: Arthur Dardia <ahdiii@webspan.net>
Subject: Re: HELP! Need to make binary exe out of perl script
Message-Id: <35657B22.8BF2356D@webspan.net>

Here's a program called Perl2Exe that converts your .pl script directly into a
 .exe.  To do it, it moves the interpreter into the .exe.  This adds about 700k
to the size of the executable.  And, you also need to use a .dll.  It also
doesn't protect your source code, but maybe it'll help you in your case.

http://www.demobuilder.com/perl2exe.htm

                    Arthur Dardia

elbirt@my-dejanews.com wrote:

> Hello,
>
> I have a perl script I wrote that I need to make an executable binary on the
> WIN 95 platform.  I would like to convert the script into a C++ file that
> performs the same(which I can compile with my c++ compiler), but don't have
> a clue how!
>
> Any suggestions?  Any help would be appreciated.  Please e-mail me at
> ben@drpaula.com.  Thanks,
>
> Ben
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/   Now offering spam-free web-based newsreading





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

Date: 22 May 1998 13:04:57 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: I can't use any modules in FreeBSD!
Message-Id: <slrn6maucg.ohr.gabor@vnode.vmunix.com>

In comp.lang.perl.misc, Tom Christiansen <tchrist@mox.perl.com> wrote :
#  [courtesy cc of this posting sent to cited author via email]
# 
# In comp.lang.perl.misc, mfuhr@dimensional.com (Michael Fuhr) writes:
# :/usr/bin/perl is Perl 4 on most FreeBSD systems 
# 
# That's dumb.

When you install FreeBSD it automatically downloads(at least if you
install over FTP) the 5.004-04 distribution.  All a sysadmin has to do
is install it.  Of course it goes in /usr/local/bin so if your path
contains /usr/bin first then you cannot use just the command perl but
your scripts will work fine as long as you use the correct shebang
line.

gabor.
--
    I'm sure that that could be indented more readably, but I'm scared
    of the awk parser.
        -- Larry Wall in <6849@jpl-devvax.JPL.NASA.GOV>


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

Date: Fri, 22 May 1998 13:32:06 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: k_wong@my-dejanews.com
Subject: Re: Int() gives wrong result
Message-Id: <Pine.GSO.3.96.980522063052.29577E-100000@user2.teleport.com>

On Fri, 22 May 1998 k_wong@my-dejanews.com wrote:


> Hi,I tried to round something with int() and the resultis kind of strange:

> $a="592.68"  

> print int($a*100)

> 59267

That answer isn't strange to me. :-)  But if you really want rounding, you
should see the FAQ. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 22 May 1998 13:08:42 GMT
From: jdporter@min.net (John Porter)
Subject: Re: LABOR CRISIS: Perl SW Guru NEEDED MA Intranet Start-up 80K+>+Equity
Message-Id: <MPG.fcf447b844626b09896e6@news.min.net>

On 21 May 1998 18:29:35 GMT,
in article <6k1rqf$9k4$1@mainsrv.main.nc.us>,
scott@softbase.com (scott@softbase.com) wrote:
> You wanna know why there's a so-called "labor crisis"?! Here it is:
>[gripes about a crummy ad snipped]
> *why*? If this is written in Perl, who cares?)

> > ... live in the MA/NH area 
> 
> Holy smokes! This ad is so specific and detailed...

Hmmm, last I looked at a map of the U.S., the "MA/NH" area
was pretty large (at least from my perspective, living in VA).
I certainly wouldn't want to commute from Hanover to Boston.
I appreciate that they indicated their locale of operations;
as an occasional want-ad reader, it drives me nuts when there's
no indication of where the job is.  And not everyone (especially
these older folks who are purportedly getting shafted by
recruiters) has the luxury of being able to relocate.  Why
should I get excited about a hot-sounding opportunity, only
to find out later that it's in Silicon Valley (or anywhere,
outside of the D.C. metro area)?

> what are the odds it will ever be filled?

Who cares? That's one company, one ad. Maybe it was a little
strict. So what?  No conclusions can be drawn from one ad.
I've seen plenty of poorly written ads; it doesn't mean
anything about the companies' actual hiring profiles.

> The "labor crisis" is a big hoax.

No, it's not.  The number of jobs is growing at a faster rate
than the number of programmers.  Even if, as the critics
propose, we make more effort to hire back and retrain those
whose skillsets are obsolescent, that's only a stop-gap.
Soon enough, that resource will be tapped to its limit, and
we'll still be left with an ever-increasing number of 
job vacancies.

John Porter


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

Date: 22 May 1998 13:12:57 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: liberame
Message-Id: <6k3tkp$r1l$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, Stefaan.Eeckels@ecc.lu (Stefaan A Eeckels) writes:
:free (no charge) = gratis (D,F) or gratuit (F)
:free (no strings) = vrij (D) or libre (F)

Adding E (English) and S (Spanish) and G (German):  

:free (no charge) = gratis (D,F,E,S) or gratuit (F)
:free (no strings) = vrij (D) or frei (G) [same sound as in D] or libre (F)

And monoglot Anglos wonder how so many Europeans speak or at least read
several languages.  It's because there just aren't that many words to
go around. :-)

Hm... is the freeware that the public talks about not free software?

--tom
-- 
    Holism permits reductionism, but reductionism does not reciprocate.
	--Larry Wall in <1994Nov10.185030.16615@netlabs.com>


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

Date: 22 May 1998 08:13:53 -0500
From: Ken MacLeod <ken@bitsko.slc.ut.us>
Subject: Re: More double standards out of the FSF
Message-Id: <m3wwbezbvy.fsf@biff.bitsko.slc.ut.us>

David Kastrup <dak@mailhost.neuroinformatik.ruhr-uni-bochum.de> writes:

> Ken MacLeod <ken@bitsko.slc.ut.us> writes:
> 
> > FWIW, I've since clarified it for myself.  Unless stated otherwise,
> > Perl can be redistributed and/or modified under the terms of either
> > the GNU GPL or the Artistic License, as stated in Perl's README.
> > 
> > There are several docs in the Perl distribution that state that they
> > must be copied verbatim.  Which, of course, means that they may not be
> > modified even if the code they document is modified in an allowed
> > manner.
> 
> Not necessarily.
> 
> A license is something that covers a transaction of intellectual
> property.  If you get a copy of something, you can not do anything
> with it without an explicit license given.  In the case of CDROMs, the
> presence of a "LICENSE" file might be sufficient for you assuming that
> the software is covered by the license, even if you have no written
> copy of the license present.  If single files are exempt without their
> status being covered in the license, you can claim an honest mistake
> in case this appears before court.
> 
> That you did not notice the files being covered by a different license
> when you change or sell those files in printed form separately,
> however, will be harder to tell to the court.
> 
> In order to have things properly legally enforcable, however, it is a
> good idea to mention the possible exceptional status of certain files
> in the overall license of a work.

That's true, but the context here is that all of us (presumably :-)
understand all of the licensing terms.

-- 
  Ken MacLeod
  ken@bitsko.slc.ut.us


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

Date: 22 May 1998 13:47:49 GMT
From: "Tim Furlong" <tf@dymaxion.com>
Subject: Perl indention formatter/standardizer
Message-Id: <01bd8587$a12e7ee0$9170b08e@tfpc.dymaxion.ca>

I'm looking for a utility, preferably a perl script, that will correct the
indention in a perl script. There almost has to be one out there -
apparently, it's just well-hidden. If you know of one, please email me here
at "tf@dymaxion.com".

-Tim


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

Date: 22 May 1998 13:22:48 GMT
From: bkline@cortex.nlm.nih.gov (Bob Kline)
Subject: Re: Problem de-referencing a reference to a typeglob stored in a hash
Message-Id: <6k3u78$d3i$1@lhc.nlm.nih.gov>

OK, I'd like to report this as a bug, but I'm not having much luck
finding out if it has already been reported.  Is there a current
bug database, along the lines of the one Sun maintains for Java?
I found an old one on the perl.com site, but that hasn't been touched
for a couple of years.  The FAQ refers me to the perlbug man page,
but unless it's kept in a separate place from all the other Perl
man pages, that page does not exist, at least not in the online
hypertext version of the docs at perl.com.  What's the policy?  Just
throw it over the wall (no pun intended) blindly to the perlbug
email alias?

Bob

Bob Kline (bkline@cortex.nlm.nih.gov) wrote:
: Thanks, Tom.  It would seem that either the implementation or the
: documentation is in error (or both; see my followup responding to Jim
: Michael's article in this thread).

: Bob Kline

: Tom Christiansen (tchrist@mox.perl.com) wrote:

: :    readline EXPR
: : 	   Reads from the file handle EXPR.  In scalar
: : 	   context, a single line is read and returned.  In
: : 	   list context, reads until end-of-file is reached
: : 	   and returns a list of lines (however you've
: : 	   defined lines with $/ or $INPUT_RECORD_SEPARATOR).
: : 	   This is the internal function implementing the
: : 	   <EXPR> operator, but you can use it directly.  The
: : 	   <EXPR> operator is discussed in more detail in the
: : 	   section on I/O Operators in the perlop manpage.

: : Except that the current implementation requires that it
: : be a typeglob, not a file handle EXPR.  This may be a bug.


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

Date: Fri, 22 May 1998 15:06:07 +0100
From: Tomaz Sesek <sesek@intercortex.com>
Subject: renaming files under NT
Message-Id: <3565864F.CC1CB3FF@intercortex.com>

Hi,

Got a problem:

when I try to rename a file in Perl, I get the message:
'No such file or directory'.

The command I use is:

rename "news.log.tmp", "news.log";

as I try to rename news.log.tmp to news.log. Both files exist before
this operation. Afterwards, news.log is gone and only news.log.tmp
remains. although it's supposed to be the other way around...

I have also tried:
rename <news.log.tmp>, <news.log>;
but it doesn't work either.

I am running the newest Perl on NT Server 4.0 (SP3) with IIS4.

Thanx. Tomaz

--
------------v---v------------------------------------------------
   |    Tomaz Sesek, BA (Cantab)    Tel: +386 (61) 132 32 58
   |    INTERCORTEX AG, Dunajska 21 Fax: +386 (61) 132 40 93
   |o   SI-1000 Ljubljana           E-mail: sesek@intercortex.com




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

Date: 22 May 1998 13:45:23 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: SRC: finding installed modules
Message-Id: <6k3vhj$r1l$7@csnews.cs.colorado.edu>

Ever want to find what modules are on your system, what versions they are,
and what they are supposed to do?    For example:

    FileHandle (2.00) - supply object methods for filehandles
    overload - Package for overloading perl operations
    Config - access Perl configuration information
    DynaLoader (1.03) - Dynamically load C libraries into Perl code
    Fcntl (1.03) - load the C Fcntl.h defines
    CGI::Imagemap (1.00) - imagemap behavior for CGI programs
    Net::Time (2.05) - time and daytime network client interface
    Net::FTP (2.33) - FTP Client class
    Net::Netrc (2.07) - OO interface to users netrc file
    Net::NNTP (2.17) - NNTP Client class
    Net::Domain (2.07) - Attempt to evaluate current hostname and domain

Here's a program to do that.  Make sure there's a dot at the end.

#!/usr/bin/perl
# pmdesc - tchrist@perl.com
# 

use strict;
use File::Find	qw(find);
use Getopt::Std	qw(getopts);
use Carp;

use vars (
    q!$opt_v!,		# give debug info
    q!$opt_w!,		# warn about missing descs on modules
    q!$opt_a!,		# include relative paths
    q!$opt_s!,		# sort output within each directory
);

$| = 1;

getopts('wvas') || die "bad usage";

@ARGV = @INC unless @ARGV;


# Globals.  wish I didn't really have to do this.
use vars (
    q!$Start_Dir!,	# The top directory find was called with
    q!%Future!,		# topdirs find will handle later
);

my $Module;

if ($opt_s) {
    if (open(ME, "-|")) {
	$/ = '';
	while (<ME>) {
	    chomp;
	    print join("\n", sort split /\n/), "\n";
	} 
	exit;
    } 
} 

MAIN: { 
    my %visited;
    my ($dev,$ino);

    @Future{@ARGV} = (1) x @ARGV;

    foreach $Start_Dir (@ARGV) { 
	delete $Future{$Start_Dir};

	print "\n<<Modules from $Start_Dir>>\n\n"
	    if $opt_v;

	next unless ($dev,$ino) = stat($Start_Dir);
	next if $visited{$dev,$ino}++;
	next unless $opt_a || $Start_Dir =~ m!^/!;

	find(\&wanted, $Start_Dir);
    } 
    exit;
}

sub modname { 
    local $_ = $File::Find::name;

    if (index($_, $Start_Dir . '/') == 0) {
	substr($_, 0, 1+length($Start_Dir)) = '';
    } 

    s { /              }	{::}gx;
    s { \.p(m|od)$     }	{}x;

    return $_;
}

sub wanted { 
    if ( $Future{$File::Find::name} ) { 
	warn "\t(Skipping $File::Find::name, qui venit in futuro.)\n"
	    if 0 and $opt_v;
	$File::Find::prune = 1;
	return;
    } 
    return unless /\.pm$/ && -f;
    $Module = &modname;

    my    $file = $_;

    unless (open(POD, "< $file")) {
	warn "\tcannot open $file: $!";
	    # if $opt_w;
	return 0;
    } 

    $: = " -:";

    local $/ = '';
    local $_;
    while (<POD>) {
	if (/=head\d\s+NAME/) {
	    chomp($_ = <POD>);
	    s/^.*?-\s+//s; 
	    s/\n/ /g;
	    #write;
	    my $v;
	    if (defined ($v = getversion($Module))) {
		print "$Module ($v) ";
	    } else {
		print "$Module ";
	    }
	    print "- $_\n";
	    return 1;
	} 
    } 

    warn "\t(MISSING DESC FOR $File::Find::name)\n" 
	if $opt_w;

    return 0;
} 

sub getversion {
    my $mod = shift;
    my $vers = `$^X -m$mod -e 'print \$${mod}::VERSION' 2>&1`;
    #my $vers = `$^X -m$mod -e 'print \$${mod}::VERSION' 2>/dev/null`;
    # 2> due to errors from MM_Unix etc
    $vers =~ s/^\s*(.*?)\s*$/$1/; # why is there whitespace here??
    return ($vers || undef);
}

sub getversion_internal {
    # This should really use system(), because otherwise we bloat.
    my $mod = shift;
    local $SIG{__WARN__} = sub {};
    eval "require $mod";
    if ($@) {
	warn "Cannot require $mod -- $@\n"
	    if $opt_v;
	return;
    } 
    my $vers;
    {
	no strict 'refs';
	return unless defined ($vers = ${ $mod . "::VERSION" });
    }
    $vers =~ s/^\s*(.*?)\s*$/$1/; # why is there whitespace here??
    return $vers;
} 


format  =
^<<<<<<<<<<<<<<<<<~~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$Module,	$_
 .
-- 
    pos += screamnext[pos]  /* does this goof up anywhere? */
        --Larry Wall in util.c from the perl source code


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

Date: 22 May 1998 13:22:16 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: SRC: here docs
Message-Id: <6k3u68$r1l$2@csnews.cs.colorado.edu>

Ever want to use a here document with interpolation?  Here's an example
that does that:

    die "Couldn't send mail" unless send_mail(<<"EOTEXT", $target);
    To: $fatboy
    From: Your Manager ($0)
    Cc: @{ get_manager_list($fatboy) }
    Date: @{[ my $now = `date`; chomp $now; $now ]} (today)

    Dear $fatboy,

    Today, you exceeded your 5 kilobyte disk quota for the ${\( 500 +
    int rand(100)) }th and last time.  Your account is now closed.

    Sincerely,
    the management
    EOTEXT

Ever want to indent the body of your here document?  Use a s/// to strip
out leading white space.

    # all in one
    ($VAR = <<HERE_TARGET) =~ s/^\s+//gm;
	your text
	goes here
    HERE_TARGET

    # or with two steps
    $VAR = <<HERE_TARGET;
	your text
	goes here
    HERE_TARGET
    $VAR =~ s/^\s+//gm;

Larry shows us in s2p how a simple fixerupper function can make this 
even easier.

    sub fix {
	my $string = shift;
	$string =~ s/^\s+//gm;
	return $string;
    }

    print fix(<<"END");
	My stuff goes here
    END

    # With function predeclaration, you can omit the parens:
    print fix <<"END";
	My stuff goes here
    END

Ever want to indent your end token as well?   Quote it as well!

    ($quote = <<'    FINIS') =~ s/^\s+//gm;
	    ...we will have peace, when you and all your works have
	    perished--and the works of your dark master to whom you would
	    deliver us. You are a liar, Saruman, and a corrupter of men's
	    hearts.  --Theoden in /usr/src/perl/taint.c
        FINIS
    $quote =~ s/\s*--/\n--/;

Another trick that Larry shows us in s2p is putting a leading 
string in front of the code that's not alive yet.  Let's imagine 
we have a dequote fixerupper function predeclared.  We can do this:

    if ($REMEMBER_THE_MAIN) {
	$perl_main_C = dequote<<'    MAIN_INTERPRETER_LOOP';
	    @@@ int
	    @@@ runops() {
	    @@@     SAVEI32(runlevel);
	    @@@     runlevel++;
	    @@@     while ( op = (*op->op_ppaddr)() ) ;
	    @@@     TAINT_NOT;
	    @@@     return 0;
	    @@@ }
	MAIN_INTERPRETER_LOOP
	$got_it++;
    }

Destroying indentation also tends to get you in trouble with poets.
So you want this to work as well:

    $poem = dequote<<EVER_ON_AND_ON;
	   Now far ahead the Road has gone, 
	      And I must follow, if I can, 
	   Pursuing it with eager feet, 
	      Until it joins some larger way 
	   Where many paths and errands meet. 
	      And whither then? I cannot say. 
		    --Bilbo in /usr/src/perl/pp_ctl.c
    EVER_ON_AND_ON
    print "Here's your poem:\n\n$poem\n"; 

Here's a dequote() function that handles all of these cases.  It looks
to see whether each line begins with a common string, and if so, strips
that off.  Otherwise, it takes the leading white space from the first
line and removes only that much off each line.

    sub dequote {
	local $_ = shift;
	my ($white, $leader);  # common white space and common leading string
	if (/^\s*(?:([^\w\s]+)(\s*).*\n)(?:\s*\1\2?.*\n)+$/) {
	    ($white, $leader) = ($2, quotemeta($1));
	} else {
	    ($white, $leader) = (/^(\s+)/, '');
	} 
	s/^\s*?$leader(?:$white)?//gm;
	return $_;
    } 

--tom
-- 
"A well-written program is its own heaven;
a poorly-written program is its own hell."


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

Date: 22 May 1998 13:40:03 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: SRC: Insertion-order hashes
Message-Id: <6k3v7j$r1l$5@csnews.cs.colorado.edu>

Tired of your hashes not being in insertion order?
Use the CPAN Tie::IxHash module!

    # initialize
    use Tie::IxHash;

    tie %home, "Tie::IxHash";
    $home{Larry}    = "Mountain View";
    $home{Tom}      = "Boulder";
    $home{Malcolm}  = "Oxford";

    print "In insertion order, the people are:\n";
    foreach $name (keys %home) {
        print "\t$name\n";
    }

    $home{Gnat}  = "Fort Collins";

    print "\nStill in insertion order, the people's cities are:\n";
    while (( $name, $town ) = each %home ) {
        print "\t$name is in $town.\n";
    }

Here's the output:

    In insertion order, the people are:
	Larry
	Tom
	Malcolm

    Still in insertion order, the people's cities are:
	Larry is in Mountain View.
	Tom is in Boulder.
	Malcolm is in Oxford.
	Gnat is in Fort Collins.

--tom
-- 
Intel chips aren't defective.  They just seem that way.


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

Date: 22 May 1998 13:28:53 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: SRC: Matching multiple patterns
Message-Id: <6k3uil$r1l$3@csnews.cs.colorado.edu>

Ever want to check a variable number of matches against one string?
It runs about 10x slower per match than if it were a constant string.
For example, let say we wanted print out lines that contain any 
of a number of strings -- at word boundaries.

    #!/usr/bin/grep
    # popgrep1 - grep for abbreviations of some places in the 
    # 		 North American heartland where they say "pop"
    # version 1: slow but obvious way
    @popstates = qw(CO ON MI WI MN);
    LINE: while (defined($line = <>)) {
	for $state (@popstates) { 
	    if ($line =~ /\b$state\b/) {
		print; next LINE;
	    } 
	}
    } 

Here's the normal workaround:

    #!/usr/bin/perl
    # popgrep2 - grep for abbreviations of places that say "pop"
    # version 2: eval strings; fast but hard to quote
    @popstates = qw(CO ON MI WI MN);
    $code = 'while (defined($line = <>)) {';
    for $state (@popstates) { 
	$code .= "\tif (\$line =~ /\\b$state\\b/) { print \$line; next; }\n";
    } 
    $code .= '}';
    print "CODE IS\n----\n$code\n----\n" if 0;  # turn on to debug
    eval $code;
    die if $@;

Or, using the fixerupper notion on here docs presented in a previous 
posting:

    #!/usr/bin/perl
    # popgrep2 - grep for abbreviations of places that say "pop"
    # version 2: eval strings; fast but hard to quote
    @popstates = qw(CO ON MI WI MN);
    sub fix {
	local $_ = shift;
	s/^\s*<NEWCODE> ?//gm;
	return $_;
    } 

    $code = fix <<"START_CODE";
	    <NEWCODE> while (defined(\$line = <>)) {
    START_CODE

    for $state (@popstates) {
	$code .= fix <<"    MIDDLE_CODE";
	     <NEWCODE>      if (\$line =~ /\\b$state\\b/) {
	     <NEWCODE>          print \$line;
	     <NEWCODE>          next;
	     <NEWCODE>      }
	MIDDLE_CODE
    }
    $code .= '}';
    print "CODE IS\n----\n$code\n----\n" if 1;  # turn on to debug
    eval $code;
    die if $@;

That's got a problem in that the patterns can't have slashes.
It's also hard to quote and understand.  Here's a solution:

    #!/usr/bin/perl
    # popgrep3 - grep for abbreviations of places that say "pop"
    # version 3: use jfriedl's build_match_func algorithm
    @popstates = qw(CO ON MI WI MN);
    $expr = join('||', map { "m/\\b\$popstates[$_]\\b/o" } 0..$#popstates);
    $match_any = eval "sub { $expr }";
    die if $@;
    while (<>) {
	print if &$match_any;
    }

That solves the problems of 1) speed 2) slashes in pattern 3) quoting
difficulties, but not the 4) hard to understand part.

There's also a RegExp module from CPAN:

    #!/usr/bin/perl
    # popgrep4 - grep for abbreviations of places that say "pop"
    # version 4: use Regexp module
    use Regexp;
    @popstates = qw(CO ON MI WI MN);
    @poppats   = map { Regexp->new( '\b' . $_ . '\b') } @popstates;
    while (defined($line = <>)) {
	for $patobj (@poppats) {
	    print $line if $patobj->match($line);
	}
    }

You might wonder about the comparative speeds of these approaches.
When run against the 22,000 line text file (the Jargon File, to be exact),
version 1 ran in 7.92 seconds, version 2 in merely 0.53 seconds, version 3
in just 0.79 seconds, and version 4 in 1.74 seconds.  The last technique
is a lot easier to understand than the others, although it does run a
little bit slower than they do.  It's also more flexible.  Something like
it will someday make its way into the standard release of Perl.

--tom
-- 
There's going to be no serious problem after this.  --Ken Thompson


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

Date: 22 May 1998 13:42:17 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: SRC: Nesting Subroutines
Message-Id: <6k3vbp$r1l$6@csnews.cs.colorado.edu>

If you're used to using nested subroutines in other programming
languages with their own private variables, you'll have to work at it a
bit in Perl.  The intuitive coding of this kind of thing incurs mysterious
warnings about ``will not stay shared''.  For example, this won't work:

    sub outer {
	my $x = $_[0] + 35;
	sub inner { return $x * 19 }   # WRONG
	return $x + inner();
    } 

A simple work-around is the following:

    sub outer {
	my $x = $_[0] + 35;
	local *inner = sub { return $x * 19 };
	return $x + inner();
    } 

--tom
-- 
/* This bit of chicanery makes a unary function followed by
   a parenthesis into a function with one argument, highest precedence. */
        --Larry Wall in toke.c from the perl source code


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

Date: 22 May 1998 13:32:45 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: TIP: watching for disk overruns
Message-Id: <6k3upt$r1l$4@csnews.cs.colorado.edu>

If you're writing a filter that writes to standard output, you
might accidentally fill up the disk and not know it.  One solution 
that doesn't require checking each print statement but still provides
decent error messages and exit status is adding this to your program:

    END { close(STDOUT) || die "can't close stdout: $!" }

--tom
-- 
    I'm sure that that could be indented more readably, but I'm scared of
    the awk parser.             --Larry Wall in <6849@jpl-devvax.JPL.NASA.GOV>


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

Date: 22 May 1998 08:48:53 -0500
From: Quentin  Fennessy <quentin@shaddam.amd.com>
Subject: Re: TIP: watching for disk overruns
Message-Id: <ximk97el8l6.fsf@shaddam.amd.com>

>>>>> "Tom" == Tom Christiansen <tchrist@mox.perl.com> writes:

    Tom> If you're writing a filter that writes to standard output,
    Tom> you might accidentally fill up the disk and not know it.  One
    Tom> solution that doesn't require checking each print statement
    Tom> but still provides decent error messages and exit status is
    Tom> adding this to your program:

    Tom>     END { close(STDOUT) || die "can't close stdout: $!" }

Excellent!  I ran into this yesterday--I had to use `splain' to understand
why my Perl program could not close a file.  (I had filled the FS).

-- 
Quentin Fennessy			AMD, Austin Texas
Secret hacker rule #11 - hackers read manuals


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

Date: 22 May 1998 10:32:22 GMT
From: Stefaan.Eeckels@ecc.lu (Stefaan A Eeckels)
Subject: Re: Tom Christiansen attacks the free software community (was: Re: GNU attacks on the open software community)
Message-Id: <6k3k7m$76l$1@justus.ecc.lu>

In article <6k3dh5$2cvc$1@grapool30.rz.uni-frankfurt.de>,
	micschne@grapool1.rz.uni-frankfurt.de () writes:
> 
> There might be other languages, where "free" inherently refers
> to libre and where you must say something like "gratis", if you
> refer to prices. I wonder if someone reading this thread knows
> such a language.
French is such a language. Come to think of it, so is Dutch.
In both langauges, the confusion shown in this thread could
not have arisen:

free (no charge) = gratis (D,F) or gratuit (F)
free (no strings) = vrij (D) or libre (F)

The latter expressions cannot be used to indicate an absence
of monetary cost, neither can the former be used to indicate
an absence of freedom.

In Dutch, some 'bleeding' of the meaning is present, however -
to indicate that something doesn't accrue taxes, one would say
'belastingvrij' (litteraly 'tax free'), whereas the French would
say 'hors taxe' (litteraly 'without taxes').

It's safe to say that in Dutch the word 'vrij' (which descends
from the same roots as 'free') has stayed closer to the original
meaning (which isn't 'gratis') than in English.

-- 
Stefaan
-- 

PGP key available from PGP key servers (http://www.pgp.net/pgpnet/)
___________________________________________________________________
   Williams and Holland's Law:  If enough data is collected,
          anything may be proven by statistical methods.


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

Date: 22 May 1998 23:35:23 +1000
From: trd@hydra.cs.mu.oz.au (Tyson Richard DOWD)
Subject: Re: Tom Christiansen attacks the free software community (was: Re: GNU attacks on the open software community)
Message-Id: <6k3uur$ib5$1@hydra.cs.mu.oz.au>

pudge@pobox.com (Chris Nandor) writes:

>In article <6k2ur0$jut$1@csnews.cs.colorado.edu>, tchrist@mox.perl.com
>(Tom Christiansen) wrote:

>#  [courtesy cc of this posting sent to cited author via email]
># 
># In comp.lang.perl.misc, 
>#     Barry Margolin <barmar@bbnplanet.com> writes:
># :Please stop with this stupid "free = with ketchup" example.  RMS's
># :definition of "free software" is based on one of the many common
># :definitions of the word, he didn't make up his definition out of whole
># :cloth, like you did.
># 
># I'm sorry Barry, but when Joe Anybody hears the word "free", his thought
># is "gratis", not "libre".  Go ask someone on the street what a "free
># lunch", a "free computer", a "free hamburger", or some "free software"
># are.  Heck, I'll bet they even get the wrong idea about "free rooms".
># Go ahead.    This is all very misleading.

>Yes, yes, yes.  And I think the fact that to most computer users,
>"freeware" and "public domain software" are entirely different things
>complicates the matter further.  When most people think of free software,
>they think of freeware, which is not what the FSF means when they say free
>software.

>All this just simply to say that RMS and his cronies should simply use
>hyperlinks and footnotes to explain to Joe User (or worse, Pointy Haired
>Bosses) what they mean by "free" instead of potentially and very likely
>causing misunderstanding to be passed to said individuals.

>I honestly can't see how that is too much to ask.

This is a joke, yes?

You want everybody who uses a word that might have a different
meaning if taken completely out of context to have a link to a
defintion of that word.  

And you honestly can't see how that is too much to ask.

I guess you want all those confusing foriegn people to translate their
web pages for you so you don't misunderstand them, too... if it's not
too much trouble.





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

Date: Fri, 22 May 1998 13:16:16 GMT
From: charlie@antipope.org (Charlie Stross)
Subject: Re: Who cares!
Message-Id: <slrn6mauip.upr.charlie@cs.ed.datacash.com>

On 22 May 1998 12:43:19 GMT, Tom Christiansen 
<tchrist@mox.perl.com> wrote:
>
>It was amazing.  90 vs 12 "real perl" from my machine this morning.

That's because you've accidentally invented the first wholly new type
of religious war to arise on usenet since about 1994. I expect this
one will run and run, much like vi/emacs, windows/linux/macos/any_os,
and tcl/perl/python: namely, GPL/other free software licenses.


-- Charlie

"Given two unrelated technical terms, an internet search engine
 will retrieve only resumes." -- Schachter's Hypothesis   


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

Date: 22 May 1998 15:35:46 +0200
From: Matthias Neeracher <neeri@iis.ee.ethz.ch>
Subject: Re: Why NOT crypt???
Message-Id: <864syih1hp.fsf@gwaihir.ee.ethz.ch>

"Jeremy Goldberg" <jgoldberg@dial-but-dont-spam.pipex.com> writes:
> > - Last of all, what good is crypt() in Perl? Its main use, as far as I can
> >   tell, is to verify the quality of passwords in UN*Xish password files
> >   (OS and WWW), and in general, there is no reason why this task can't be
> >   done on the UN*X machine itself (especially if you have *legitimate*
> >   grounds to verify the password files).

> Well, how about:
> 
>     When you want to test scripts locally on a Windoze machine.

Yes, this might occasionally be useful, but if the script is going to be tied
that closely to UN*X security, it might be reasonable to test it on an UN*X
machine.

>     When you want to be able to encrypt passwords and the like on scripts
> running on a Windoze machine.

I must admit that I'm not familiar with Windows technology, but I would have
thought that they have their own password encryption format, don't they?

>     When you want to send passwords encrypted over the net, but can't (or
> don't want to) use SSL or a higher-grade encrypt scheme.

Sounds like a terrible idea, security-wise, unless you use it as a
challenge/response scheme with one side sending the salt and the other sending
the encrypted password.

I agree that all of these are legitimate uses of crypt on sub-Unix (tm)
systems, but I'm still not sure whether they are that important. 

Matthias

-- 
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
 #!/usr/local/bin/perl -s-- -export-a-crypto-system-sig -RSA-in-3-lines-PERL
 ($k,$n)=@ARGV;$m=unpack(H.$w,$m."\0"x$w),$_=`echo "16do$w 2+4Oi0$d*-^1[d2%
 Sa2/d0<X+d*La1=z\U$n%0]SX$k"[$m*]\EszlXx++p|dc`,s/^.|\W//g,print pack('H*'
 ,$_)while read(STDIN,$m,($w=2*$d-1+length($n||die"$0 [-d] k n\n")&~1)/2)
    -- http://dcs.ex.ac.uk/~aba/rsa-perl.html by Adam Back 	





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

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

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