[9073] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2691 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 22 13:07:41 1998

Date: Fri, 22 May 98 10:02:02 -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: 2691

Today's topics:
    Re: renaming files under NT <perlguy@inlink.com>
    Re: renaming files under NT <lr@hpl.hp.com>
    Re: Tom Christiansen attacks the free software communit (Stefaan A Eeckels)
    Re: Tom Christiansen attacks the free software communit (Stefan Kruger)
        Tom Christiansen (Thomas Bushnell, n/BSG)
    Re: use Berkley DB slow down script? Is Benchmark accur (Jason Gloudon)
    Re: Why NOT crypt??? (Stuart McDow)
    Re: Why NOT crypt??? <neeri@iis.ee.ethz.ch>
        wierd regex question thonge@my-dejanews.com
    Re: XML Module ionFreeman@bigFoot.com
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 22 May 1998 15:58:50 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: renaming files under NT
Message-Id: <3565A0BA.F8A4A125@inlink.com>

You need to put the FULL PATH information, including the drive letter,
in the rename function.  NT doesn't seem smart enought to look in the
current directory for a file.

HTH,

Brent


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

Date: Fri, 22 May 1998 09:23:02 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: renaming files under NT
Message-Id: <6k48pa$8ju@hplntx.hpl.hp.com>

[posted and emailed]

Tomaz Sesek wrote in message <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";


Two suggestions:

Always check the results of an operating-system request such as this
one:

rename ..., ... or die "Couldn't rename ...; $!";

Always use absolute pathnames for the files, rather than the relative
ones you use above.  Perhaps the current directory isn't what you think
it is.

--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com





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

Date: 22 May 1998 15:54:13 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: <6k4735$8nc$1@justus.ecc.lu>

In article <EtD3MG.J8v@echelon.nl>,
	kees@echelon.nl (Kees Hendrikse) writes:
> In <6k3k7m$76l$1@justus.ecc.lu> Stefaan A Eeckels writes:
> 
>> 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.
> 
> I'm not so sure about that. Take for example the dutch 'vrij parkeren' (free
> parking) which does mean: no charge for parking. I think in all western
> languages the notion of free is dangerously close to 'gratis'. 
I do stick to my guns here - especially if you take my first
and second paragraphs together. I do acknowledge that
there are cases where 'vrij' means 'gratis', but the usage of
'vrij' in that meaning is not as common as in English. One
wouldn't say 'vrije koffie' when wanting to indicate that the
coffee is served free of charge. And 'vrije liefde' doesn't
mean you don't have to pay your Significant Other ;-)

So it's quite unlikely that 'Vrije Software Stichting' 
(Free Software Foundation in Dutch) could ever be 
misconstrued to mean people who advocate 'Gratis Software'.

There might be a shift of meaning between the dialects of
Dutch spoken in the Netherlands and in Belgium, but I'd still be
sceptical if you'd tell me that in the Netherlands 'vrij' is used
as a common synonym for 'gratis' in all circumstances. 

Also note that in English you'd have to strain to use
any other word but 'free' - neither 'gratis' nor 'libre'
are words that are commonly used in English to express
the two different meanings of 'free' we've been arguing
about in this thread.

-- 
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: Fri, 22 May 1998 15:25:57 GMT
From: stefan@cs.bris.ac.uk (Stefan Kruger)
Subject: Re: Tom Christiansen attacks the free software community (was: Re: GNU attacks on the open software community)
Message-Id: <EtD6v9.84x@fsa.bris.ac.uk>

micschne@grapool1.rz.uni-frankfurt.de wrote:

: 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.

Yes - Swedish.

'Fri'    == libre
'Gratis' == gratis


: Michael
: --
: Michael Schneider
: m_schnei@cs.uni-frankfurt.de


--
Stefan Kruger,  stefan@cs.bris.ac.uk, http://www.cs.bris.ac.uk/~stefan
PGP: 88 37 B1 29 22 61 FF 20  DF 0D B2 9D 41 47 D3 7B (key on request)
A tree is a tree. How many more do you have to look at? - Ronald
Reagan, opposing expansion of Redwood National Park


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

Date: 22 May 1998 11:59:37 -0400
From: tb@mit.edu (Thomas Bushnell, n/BSG)
Subject: Tom Christiansen
Message-Id: <u1hwwbexpna.fsf@ten-thousand-dollar-bill.MIT.EDU>


I don't think this discussion is going anywhere.

Everyone, I think, agress that the documentation Tom has written is
excellent.  Nobody doubts that.

Nobody challenges Tom's right to distribute his work under whatever
terms he wants.

The FSF would like documentation like perlfaq which meets the open
source libre definition of "free", and has had (for a long time now)
an item on the task list to that effect.  Perlfaq does not meet this
definition, because it prohibits the distribution of modified version,
and it prohibits distributions for profit.

But Tom is never going to understand the point, so we might as well
give up.  Once I mentioned to Tom that windows in emacs were a really
cool aid to productivity, and that the new windows in vi didn't really
do as well because in vi (then, I don't know about now) there was no
such thing as a buffer that's not displayed in any window.

He nearly broke down into tears and demanded the conversation stop--he
just couldn't handle the thought.  I don't know what bothered him so
much.  Perhaps he couldn't handle the fact that His Favorite Editor
didn't quite do everything, perhaps he couldn't handle the idea that
"adding windows to an editor" could mean different things.  

But in my experience Tom is just not able to deal with disagreement,
especially not when he cares about the thing.  In his email to me this
morning I received a nice little sentence from Tom in which he
suggested I should quite literally burn in hell.

He's losing touch, and for his own mental health, we should let him go
back to writing documentation and teaching classes, which he does
well.

Thomas



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

Date: Fri, 22 May 1998 16:30:54 GMT
From: jgloudon@hyssop.bbn.com.bbn.com (Jason Gloudon)
Subject: Re: use Berkley DB slow down script? Is Benchmark accurate?
Message-Id: <2Lh91.1$KE2.53@cam-news-reader1.bbnplanet.com>

tdj@mail.com <tdj@mail.com> wrote:
 .
>With my old script I was using .TXT files to read/write  records which are
>frequently accessed.  Recently I rewrite the script to use the standard Perl
>DB files, in the hope that it will improve scripts' efficiency.
 .
>Should I avoid to use Perl DB?	Shouldn't Perl DB reduce disk access and
>improve my script's efficiency? What is the difference between usr / sys /
>cpu returned by the timediff string?

Your benchmarking DB file access versus text file access illustrates the fact
that if you are reading a file that is fairly small, reading it sequentially is
going to be much faster than the seeking, extra reads, and additional system
calls that would be required to find a record in the DB file.

For large ( you'd have to test to find just how large is large) files requiring
random access using a DB file is a LOT faster than sequential file access.

--
Jason


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

Date: 22 May 1998 16:00:25 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Why NOT crypt???
Message-Id: <6k47ep$8k7$1@ns1.arlut.utexas.edu>

"Jeremy Goldberg" <jgoldberg@dial-but-dont-spam.pipex.com> writes:
>
> Really? And if the remote machine doesn't keep error logs? 

Sounds like the remote machine isn't configured correctly. You should
ask that this be fixed.

> Or if you have no access beyond FTP?

Sounds like a broken ISP. It should be replaced.

> Or you have to do it over a modem when the phone bill is starting to
> smoke?

If you're going to test code that uses crypt() that will run on a Unix
machine, it's probably best to test it on a similar
machine. Otherwise, I'd never trust the code.

> unless you can install Linux - which isn't always a practical answer
> either

Having no access to a test machine other than the target machine
running in production configuration is not an environment to develop
reliable code in.

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


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

Date: 22 May 1998 17:56:43 +0200
From: Matthias Neeracher <neeri@iis.ee.ethz.ch>
Subject: Re: Why NOT crypt???
Message-Id: <863ee2guys.fsf@gwaihir.ee.ethz.ch>

"Jeremy Goldberg" <jgoldberg@dial-but-dont-spam.pipex.com> writes:
> >>     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?
> 
> Quite possible... but how do you access it from Perl, then, and still keep
> it portable?

Encapsulate the differences in a module, then. I tend to mistrust "portable"
solutions that involve porting a subsystem of the OS to an utterly foreign OS
that already has a different, native mechanism (Like the original ports of Tk
for Windows and MacOS which apparently emulated X window calls).

> >>     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.
> 
> As a simple alternative to nothing at all, it can't be beaten.

Quite the opposite, in fact! Even solutions as flaky as exchanging cleartext
passwords or relying on trusted hosts are far preferable to accepting crypt()ed
passwords with a chosen salt. The former at least require IP snooping or
spoofing to crack, the latter simply involves looking up the crypted() password
in the (usually world readable) passwd file.

> >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.
> 
> It's not a question of important, it's a question of being able to do it at
> all. As it stands, you have to write your code, upload it, and then run it
> and see if it works properly - no exhaustive testing offline, unless you can
> install Linux - which isn't always a practical answer either, or none of us
> would use Windoze in the first place.

I'm afraid that I remain doubtful of the value of "exhaustive" testing of a
security sensitive script on a foreign OS. Note that if the script is mostly
not security sensitive, you can get a lot of testing done by simply defining
crypt() to be the identity function.

Matthias

-- 
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
 "Neeracher can and no doubt will perform the usual cheerleader duties."
              -- ataylor@nmsu.edu in <ATAYLOR.92Dec8135851@gauss.nmsu.edu>




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

Date: Fri, 22 May 1998 16:19:06 GMT
From: thonge@my-dejanews.com
Subject: wierd regex question
Message-Id: <6k48hq$rse$1@nnrp1.dejanews.com>

Hello all,

I'm learning this stuff as I go, of course, but I'm putting together a little
online fill-out form using Perl.  I'd like to verify that certain fields are
in the right format for the type of information the field contains,
for instance: e-mail, phone numbers, ssnumbers, and other ad hoc fields that
might come up.

In the interest of keeping my Cgi program modular, I want to include the
verification formats in hidden feilds in the actual HTML document.  is there
any way to read a regex into a $calar and then compare the contents of a field
against it?  like this (command line version) (now, please tell me if my
pattern is right to match a social security number)

print "Input >";
chomp ($in = <STDIN>);
$test = '/\d{3}-\d{2}-\d{4}/';
if ($in =~ $test) {
	print "Yup";
} else {
	print "Nope";
}

As far as my linited logic and regex experiance can tell, this should work as
long as $test is actually seen as the pattern /\d{3}-\d{2}-\d{4}/.

Can anybody see what I'm doing wrong, or see a better way?

Thanks Alot,
Tony

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


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

Date: Fri, 22 May 1998 16:18:40 GMT
From: ionFreeman@bigFoot.com
Subject: Re: XML Module
Message-Id: <6k48h0$rs6$1@nnrp1.dejanews.com>

Andrew,
    Thanks for your help. http://www.sil.org/sgml/xml.html#xmlAndPerl does
not apparently exist, though -- I'd already hit that dead end.
    I found http://www.perl.com/perl-xml.html, which essentially says there's
some hope of releasing things by the end of the year.
ion

In article <6jdf8h$17c$1@mulga.cs.mu.OZ.AU>,
  acassin@cs.mu.oz.au (Andrew CASSIN) wrote:
>
> Ion Chalmers Freeman (ion@aroma.com) wrote:
> :     I've got a DTD and I need to output valid XML from my perl script. Is
> : there a module that assists with this? I couldn't find one on CPAN.
>
> Your own .sig nearly gives you the answer. Try
>
> http://www.sil.org/sgml/xml.html
>
> which offers a detailed list of many aspects of XML technology.
>
> Andrew Cassin
> acassin@cs.mu.oz.au
>


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


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

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

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