[9086] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2704 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 23 16:07:42 1998

Date: Sat, 23 May 98 13:00:28 -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           Sat, 23 May 1998     Volume: 8 Number: 2704

Today's topics:
    Re: Bug reporting and the Perl developers (was: Re: Pro (Bob Kline)
    Re: cksum w/ Perl? (Chris Hamilton)
    Re: Clearly define "free software" (le Fanttme)
    Re: Clearly define "free software" (le Fanttme)
        Encoding URLs with CGI.pm.  How? (Luke Steele)
    Re: Encoding URLs with CGI.pm.  How? <rootbeer@teleport.com>
    Re: Getting hex codes from string (Kevin Reid)
    Re: GNU attacks on the open software community <dak@mailhost.neuroinformatik.ruhr-uni-bochum.de>
    Re: GNU attacks on the open software community (Greg Lindahl)
    Re: GNU attacks on the open software community (Marcus G. Daniels)
    Re: GNU attacks on the open software community (le Fanttme)
    Re: GPL documentation == unspeakable evil (le Fanttme)
    Re: GPL documentation == unspeakable evil (Marcus Meissner)
        How can I emulate http POST from a perl script <jerryp.usenet@connected.demon.co.uk>
    Re: How can I emulate http POST from a perl script <rootbeer@teleport.com>
    Re: Quiet summary (le Fanttme)
    Re: Suggestion Re: GNU attacks on the open software com (le Fanttme)
        Taint, untaint, recusion and internal functions (Marc Haber)
    Re: Taint, untaint, recusion and internal functions <rootbeer@teleport.com>
    Re: Taint, untaint, recusion and internal functions (Kevin Reid)
    Re: Tom Christiansen attacks the free software communit (le Fanttme)
    Re: Tom Christiansen attacks the free software communit (le Fanttme)
    Re: Tom Christiansen attacks the free software communit (le Fanttme)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 23 May 1998 19:06:48 GMT
From: bkline@cortex.nlm.nih.gov (Bob Kline)
Subject: Re: Bug reporting and the Perl developers (was: Re: Problem de-referencing a reference to a typeglob stored in a hash)
Message-Id: <6k76o8$8vf$1@lhc.nlm.nih.gov>

Thanks, Tom!  That's very good news.

Bob

Tom Phoenix (rootbeer@teleport.com) wrote:
: On 23 May 1998, Bob Kline wrote:

: > 1. There is no publicly available bug database for Perl.  You just 
: >    throw a bug report over the fence, but you can't check first to 
: >    find out if it has already been reported, nor can you track its 
: >    progress.

: Correct. But The Perl Institute has been working on setting up a bug
: database that should be available RSN.


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

Date: 23 May 1998 16:55:33 GMT
From: chrish@squonk.net (Chris Hamilton)
Subject: Re: cksum w/ Perl?
Message-Id: <6k6v25$p3m$1@duke.squonk.net>

Rich Baldwin (baldwin@nssdca.gsfc.nasa.gov) wrote:
: I am looking for a Perl script which will compute a CRC32 checksum on a
: file. This would
: be equivalent to UNIX cksum.  I need to run this code on a VAX.  Any
: pointers?

There is an MD5 module that generates, well, an MD5 checksum on a string
or a file.

Avaliable at your nearest CPAN.

---
Chris Hamilton                 C7 F9 1E FF 4F D8 F8 87  
chrish@squonk.net              F8 13 5F 69 63 B5 EB A8

"You're just jealous because the 'voices' talk to me."



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

Date: Sat, 23 May 1998 19:16:01 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: Clearly define "free software"
Message-Id: <1AE8153567C979AE.11F8D74B660AEF80.265552A676878452@library-proxy.airnews.net>

On Thu, 21 May 1998 23:17:13 GMT, robert havoc pennington
<hp@pobox.com> wrote:

>cls@seawood.org (Christopher Seawood) writes:
>> 
>> Now that pretty much fits my definition of free software. However, GPL
>> software does not fall under this heading, IMO. Why not? Because GPL
>> software restricts what you can _use_ the software with.  I am not free
>> to _use_ (compile & link, in this case) GPL software with propreitary
>> libraries.  So according to the above definition, GPL software is not
>> "free software as defined by the FSF".
>>
>
>You are free to compile and link with proprietary libraries, you just
>can't distribute the result. So use is not limited. Distribution is,
>however.

Which basically means that you're not permitted to share useful stuff
under this concept. I have written some stuff for Oracle that could be
very useful -- but I could not incorporate it with useful GNU GPL
software, even if I wanted to.

If, that is, I wanted to share it with others.

-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: Sat, 23 May 1998 19:34:03 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: Clearly define "free software"
Message-Id: <B84A40540D3CC8E1.AECBB570ADA7C61A.53DD91CBD7941E65@library-proxy.airnews.net>

On Fri, 22 May 1998 04:54:08 GMT, Barry Margolin
<barmar@bbnplanet.com> wrote:

>In article <Ha491.251$C06.1283191@news.san.rr.com>,
>Christopher Seawood <cls@seawood.org> wrote:
>>robert havoc pennington (hp@pobox.com) wrote:
>>: You are free to compile and link with proprietary libraries, you just
>>: can't distribute the result. So use is not limited. Distribution is,
>>: however.
>>
>>Ok, so instead of not adhering to the "use" portion of the "free software
>>definition as defined by the FSF", it doesn't adhere to the "distribute,
>>either verbatim or with modifications" part.  The point being that GPL
>>software does not adhere to the "free software definiton as defined by
>>the FSF." (I should really make a macro for that. ;)
>
>Because your right to distribute this would interfere with the recipient's
>right to modify.  You can't both win, so one of you has to lose, and it's
>the one who wants to make a proprietary version.

Actually, that's not true. The recipient would have the right to
modify the GNU GPLed source to work with another proprietary (or free)
licensed library/package. If I wrote something which interacted with
Oracle, you could possibly make it work with Sybase or maybe even gdbm
if you wanted to do so.

-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: Sat, 23 May 1998 17:49:25 GMT
From: ljs@cableinet.co.uk (Luke Steele)
Subject: Encoding URLs with CGI.pm.  How?
Message-Id: <35670c10.9987474@news.cableinet.co.uk>

Hi,

I'm having real difficulty working out how to encode URLs with CGI.pm.
If I've got a scalar (called $var, say):

$var = "A string containing spaces, &ampersands & and various other
charaters!!#%$&";

How do convert this into a string suitable for use in a URL?  I've
read all the documentation and FAQs I've been able to lay my hands on
but to no avail, so any help would be greatly appreciated!




--
Luke Steele
ljs@cableinet.co.uk


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

Date: Sat, 23 May 1998 18:46:08 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Luke Steele <ljs@cableinet.co.uk>
Subject: Re: Encoding URLs with CGI.pm.  How?
Message-Id: <Pine.GSO.3.96.980523114055.22348M-100000@user2.teleport.com>

On Sat, 23 May 1998, Luke Steele wrote:

> I'm having real difficulty working out how to encode URLs with CGI.pm.

I usually use URI::Escape, which (I believe) is a part of the LWP module. 
Hope this helps! 

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



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

Date: Sat, 23 May 1998 15:08:31 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Getting hex codes from string
Message-Id: <1d9gbe6.1uhpmog1e4wi1wN@slip-32-100-246-56.ny.us.ibm.net>

Tom Phoenix <rootbeer@teleport.com> wrote:

> On Fri, 22 May 1998, Kevin Reid wrote:
> 
> >   open FILE;
> 
> Even when your script is "just an example" (and perhaps especially in that
> case!) you should _always_ check the return value after opening a file.
> Thanks!

<MISTAKE TYPE="STUPID">

The script was written on a Macintosh, so there was no real need to
check the open() -- but I forgot to fix this before posting the script.

</MISTAKE>

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


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

Date: 23 May 1998 19:09:49 +0200
From: David Kastrup <dak@mailhost.neuroinformatik.ruhr-uni-bochum.de>
Subject: Re: GNU attacks on the open software community
Message-Id: <m2wwbclxr6.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>

rodgerd@orwell.rm.gen.nz (Rodger Donaldson) writes:

> On 23 May 1998 10:32:37 GMT, ? the platypus {aka David Formosa} 
> <dformosa@st.nepean.uws.edu.au> wrote:
> 
> >In <u1h1ztmz5co.fsf@ten-thousand-dollar-bill.MIT.EDU> tb@mit.edu 
> (Thomas Bushnell, n/BSG) writes:
> 
> >[...]
> >
> >>Worse still, if I am redhat, I cannot distribute perlfaq at all.  
> >
> >What is stopping you from distributing perlfaq if you are redhat?
> 
> [rodgerd@orwell rodgerd]$ uname -a
> Linux orwell.rm.gen.nz 2.1.101 #7 SMP i586
> 
> I can't see it myself.  And I haven't heard TC abusing Red Hat lately.

If he wanted to, he could sue them for inclusion of his FAQ.  So they
are either being careless in including the stuff, or relying on his
goodwill.


-- 
David Kastrup                                     Phone: +49-234-700-5570
Email: dak@neuroinformatik.ruhr-uni-bochum.de       Fax: +49-234-709-4209
Institut f|r Neuroinformatik, Universitdtsstr. 150, 44780 Bochum, Germany


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

Date: 23 May 1998 16:39:48 GMT
From: lindahl@pbm.com (Greg Lindahl)
Subject: Re: GNU attacks on the open software community
Message-Id: <6k6u4k$2jd@news3.newsguy.com>

fantome/@/usa/./net (le Fanttme) writes:

> That's funny ... and I always thought that the Perldocs were worded
> very similarly to "Programming Perl" ... very similar.

Beats me, I've never compared the two. But if you are correct, that
justifies Tom's ravings, when the task list entry could be explained
by simple ignorance?

Wow, I see this habit of flaming your friends is spreading. Oh well,
so much for our sense of community. Then again, your past flames here
show how important you consider community.

-- g


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

Date: 23 May 1998 11:45:07 -0600
From: mgd@ute.santafe.edu (Marcus G. Daniels)
Subject: Re: GNU attacks on the open software community
Message-Id: <cin2c8khjw.fsf@ute.santafe.edu>


TC> But you aren't going to allowed to lie about work created by
TC> others, to steal things and claim them as your own and deny their
TC> authors due copyright recognition. 

GPL> a) You must cause the modified files to carry prominent notices
GPL> stating that you changed the files and the date of any change.

BM> Where does that say that the original author must be acknowledged?
BM> It says you must indicate that you changed the files, but it
BM> doesn't say you have to indicate who wrote the previous version.

Well, so long as it's clear to recipients that their software or
documentation isn't the original, then it seems inappropriate to me to
use phrases like "steal things and claim them as your own".  After all,
the purpose of the GPL is to keep a work product in the commons.


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

Date: Sat, 23 May 1998 18:55:15 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: GNU attacks on the open software community
Message-Id: <6607447796ED9538.6DEC3BD8248AA575.FAB9A18E52ADCC72@library-proxy.airnews.net>

On 23 May 1998 16:39:48 GMT, lindahl@pbm.com (Greg Lindahl) wrote:

>fantome/@/usa/./net (le Fanttme) writes:
>
>> That's funny ... and I always thought that the Perldocs were worded
>> very similarly to "Programming Perl" ... very similar.
>
>Beats me, I've never compared the two. But if you are correct, that
>justifies Tom's ravings, when the task list entry could be explained
>by simple ignorance?
>
>Wow, I see this habit of flaming your friends is spreading. Oh well,
>so much for our sense of community. Then again, your past flames here
>show how important you consider community.

I've never gotten the sense that the GNU "community" gives a damn
about any other open source software community because they often
permit commercial interests to incorporate the open source into the
proprietary source in one way or another.

It's also been my experience that the GNU supporters have been the
ones who have taken the religious-ideological stance which earns them
no friends.

-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: Sat, 23 May 1998 19:01:25 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: GPL documentation == unspeakable evil
Message-Id: <15169ADFCE83B6EC.C0582CC5FD68CBAD.AD2F6D69CD3AFE46@library-proxy.airnews.net>

[courtesy copied to Tom C.]
On 23 May 1998 16:20:50 GMT, fjh@cs.mu.oz.au (Fergus Henderson) wrote:

>fantome/@/usa/./net (le Fantome) writes:
>
>>So as long as the price for the CD is not increased more than $0.07
>>because of the inclusion of Perl, the restriction has been met.
>
>Increased from what?
>
>Suppose I sell two CDs, one for $100 that contains 500M of
>"the ultimate in unbreakable encryption -- one time pads",
>and one for $100.07 that contains the same, plus the PerlFAQ.
>Is that OK?

I don't see there being a problem with this.

It follows from Tom's copyright restrictions and permissions that this
would be permitted. Hopefully Tom can give his opinion on this.

-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: 23 May 1998 19:20:59 GMT
From: msmeissn@cip.informatik.uni-erlangen.de (Marcus Meissner)
Subject: Re: GPL documentation == unspeakable evil
Message-Id: <6k77ir$pjk$2@rznews.rrze.uni-erlangen.de>

In article <6k1510$5nf$2@csnews.cs.colorado.edu>,
Tom Christiansen  <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc, jkekoni@cc.hut.fi (Joonas Timo Taavetti Kekoni) writes:
>:So what is the problem?
>:1. direct copying of examples to your non GPL program is forbidden.
>
>I consider that a major problem.   
>
>I have no right to force moral choices on others--or they cease to be
>moral choices.  No one applauds the cow because it did not rise up and
>slay the eagle.  Doing something you're forced into doing merits no
>moral high ground.  It just means you've been forced to do things their
>way.  This is contrary to the whole spirit of Perl--and public morals.
>You can't legislate morality, and I shall resist all attempts to do so.

Well, you are forcing a moral choice onto us by repeatedly saying "GPL is
evil, GPL is evil".

HAND, Marcus
-- 
   <URL:http://wwwcip.informatik.uni-erlangen.de/~msmeissn/>


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

Date: Sat, 23 May 1998 18:15:58 +0100
From: Jerry Pank <jerryp.usenet@connected.demon.co.uk>
Subject: How can I emulate http POST from a perl script
Message-Id: <TGyvFAAORwZ1EwHS@connected.demon.co.uk>

I'd like to be able to send html form data to a server using the HTTP
POST method directly from a perl script.  

eg: The perl equiv. of :

        <form method='post' action='http://www.foo.com/cgi/baz.pl'> 
        <input type='hidden' name='data' value='fizz'>
        <input type='submit' value='Send'></form>

but with perl ``pushing the button''    

I'm sure the secret lies within HTTP::Request but I'm still rather
confused (even after reading all the HTTP::* manpages)

Could some kind soul show me a simple example or some hints?  
-- 
Jerry Pank           mailto:jerryp.usenet@connected.demon.co.uk

I wouldn't ever write the full sentence myself, but then, I never use
goto either.
-- Larry Wall in <199709032332.QAA21669@wall.org>


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

Date: Sat, 23 May 1998 17:33:01 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Jerry Pank <jerryp.usenet@connected.demon.co.uk>
Subject: Re: How can I emulate http POST from a perl script
Message-Id: <Pine.GSO.3.96.980523102803.22348L-100000@user2.teleport.com>

On Sat, 23 May 1998, Jerry Pank wrote:

> I'd like to be able to send html form data to a server using the HTTP
> POST method directly from a perl script.  

That's easy to do with the LWP module.

> I'm sure the secret lies within HTTP::Request but I'm still rather
> confused (even after reading all the HTTP::* manpages)

Have you also read lwpcook? Hope this helps! 

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



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

Date: Sat, 23 May 1998 18:23:32 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: Quiet summary
Message-Id: <C8972DEFBE40E822.049643794D820F22.32BB2C19955562DE@library-proxy.airnews.net>

On Fri, 22 May 1998 13:03:06 +0200, Olof Oberg
<millNO@SPAMludd.luth.se> wrote:

>From the PerlFAQ
>  Any commercial use of any portion of this document without 
>  prior written authorization by its authors will be subject 
>  to appropriate action.
>
>My conclusion is that the Perl documentation is not open source 
>and therefore not free either. Free of charge yes, but not free 
>as defined above.

Except that documentation is not software.

-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: Sat, 23 May 1998 18:17:20 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: Suggestion Re: GNU attacks on the open software community
Message-Id: <4167849EF8152B50.FA2A305A3FD9BFEF.3743065D99F3676A@library-proxy.airnews.net>

On 21 May 1998 19:38:09 GMT, gebis@albrecht.ecn.purdue.edu (Michael J
Gebis) wrote:

>Jason Larke <jlarke@anthem.aa.ans.net> writes:
>
>}I think you're right about why Tom is upset.
>
>}But instead of trying to get him to rewrite his license, I think
>}it would be nice if the FSF changed their statement to read
>}something like:
>
>Why should the FSF type one keystroke to pander to someone who is too
>lazy to read their definition of "free"?  

Because this sort of garbage from the FSF hurts their cause.

-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: Sat, 23 May 1998 17:42:27 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Taint, untaint, recusion and internal functions
Message-Id: <6k71q4$j1e$1@nz12.rz.uni-karlsruhe.de>

Hi!

I am trying to write a DelTree function that emulates system("rm -rf")
without the security gotchas. Thus, perl is running as perl -wT.

Neither the taint example from the camel book nor the tainted()
example from /usr/lib/perl5/tainted.pl will run with -w set, so I had
to comple the Taint module myself. It's really amazing how easy this
is on the Linux box.

Some robustness code and error handling has been removed from the code
for clarity and to save bandwidth.

#!/usr/bin/perl -wT

use strict;
use Taint;

$ENV{PATH} = "/usr/bin:/bin:/usr/local/bin";

sub untaint
{
	my ($parm) = @_;
	if( $parm =~ /^(.+)$/ )
	{
		return $1;
	}
}

sub DelTreeInternal
{
  my ($target) = @_;

  # Gesamtes Directory durchgehen
  opendir "dir", $target;
  my @directory = readdir "dir";
  closedir "dir";
  File: foreach(@directory)
  {
    my $targetname = untaint("$target/$_");

    if( /^\.|\.\.$/ )
    {
      next File;
    };

    if( -d $targetname )
    {
      DelTreeInternal($targetname);

      next File;
    };

    unlink($targetname) or die;
    next File;
  }
  rmdir( $target ) or die;
}

Now, besides from the usual request to point out perl-clumsiness in my
quite c-esque code, I have some requests for comments and questions.

It is clear that the strings read from the directory are tainted. But
I believe it is safe to un-taint them at that position since I
actually want to delete the directory. Am I missing something here?

Can the untaint function be written in a more elegant way? Especially,
I had been forced to return the untainted string as a function result
since

sub untaint
{
	my ($parm) = @_;
	if( $parm =~ /^(.+)$/ )
	{
		$parm = $1;
	}
}

doesn't seem to work. Should I really use $parm = @_[0] instead?

This article was originally much longer since my code has been
optimized while I was writing it so much of my original problems have
vanished while improving. I am posting it nevertheless since I believe
I have still much to learn.

So, any hints will be appreciated.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29


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

Date: Sat, 23 May 1998 19:03:33 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Taint, untaint, recusion and internal functions
Message-Id: <Pine.GSO.3.96.980523114746.22348N-100000@user2.teleport.com>

On Sat, 23 May 1998, Marc Haber wrote:

>     if( -d $targetname )

Don't forget that it might be a symbolic link, too! 

> It is clear that the strings read from the directory are tainted. But
> I believe it is safe to un-taint them at that position since I
> actually want to delete the directory. Am I missing something here?

Yes: Your untaint methodology assumes that there are no newlines in a
filename, but that's not true. 

Also, I don't think that this is a program which benefits from taint
checking, since you're just throwing away the taintedness as soon as you
see it. That is, I don't think you're sending anything to the system
except for strings you've ("blindly") marked as untainted, so there's no
taint-checking issue. Maybe...

> Should I really use $parm = @_[0] instead?

Almost certainly not! But if you wish to modify your sub's arguments, use
elements of @_ directly.

Hope this helps!

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



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

Date: Sat, 23 May 1998 15:08:33 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Taint, untaint, recusion and internal functions
Message-Id: <1d9hkpy.osg6l0ia9h8N@slip-32-100-246-56.ny.us.ibm.net>

Marc Haber <Marc.Haber-usenet@gmx.de> wrote:

> Can the untaint function be written in a more elegant way? Especially,
> I had been forced to return the untainted string as a function result
> since
> 
> sub untaint
> {
>       my ($parm) = @_;
>       if( $parm =~ /^(.+)$/ )
>       {
>               $parm = $1;
>       }
> }
> 
> doesn't seem to work. Should I really use $parm = @_[0] instead?

Hmm. Try this:

sub untaint (\$) {$_[0] = ($_[0] =~ /(^.*$)/)[0]}

(I have not tested this, because I don't know how to create on-demand
tainted data.)

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


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

Date: Sat, 23 May 1998 18:11:04 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: Tom Christiansen attacks the free software community (was: Re: GNU attacks on the open software community)
Message-Id: <A83A04969B0B9899.609FA6AA06BAFFC1.A7417B54B6F66F02@library-proxy.airnews.net>

On 22 May 1998 11:23:19 -0400, bwarsaw@cnri.reston.va.us (Barry A.
Warsaw) wrote:

>
>>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:
>
>    TC> I'm sorry Barry, but when Joe Anybody hears the word "free",
>    TC> his thought is "gratis", not "libre".  Go ask someone on the
>    TC> street what a "free lunch", a "free computer", a "free
>    TC> hamburger", or some "free software" are.  Heck, I'll bet they
>    TC> even get the wrong idea about "free rooms".  Go ahead.  This
>    TC> is all very misleading.
>
>I'm sure you didn't mean it as such, but what a very poignant insight
>into the state of the world, where we are so concerned about the
>economic that we barely even think about the liberty.
>
>Regardless, your example is incomplete.  Ask Joe Anybody what the
>`free' in free speech, free press, or free exercise of religion means
>and I'll bet you won't get answers like, "A dime a minute?  I don't
>think so!", "You can't charge me for that newspaper", "So you mean I
>don't have to pay a buck a prayer?".

The problem with this rebuttal is that it continues to ignore the fact
that "free lunch", "free computer", "free hamburger", and (yes) "free
software" are all attached to objects which are usually sold.

The FSF has really chosen the wrong descriptor, because the software
is open source -- but more to the point, it is perpetually open source
(that is, once open, the software itself can't be re closed by anyone;
new versions could be by the original author, but not the original).

-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: Sat, 23 May 1998 18:12:35 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: Tom Christiansen attacks the free software community (was: Re: GNU attacks on the open software community)
Message-Id: <2FEB5F4573591073.B85DDF25BF232803.82D66EE2D00D3338@library-proxy.airnews.net>

On Fri, 22 May 1998 21:13:57 GMT, robert havoc pennington
<hp@pobox.com> wrote:

>however it is people stay up with the latest developments in the
>free[4] software world.

>[4] GNU sense.

Thank ghod that there's more to the free software world than the GNU
sense of free software.

-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: Sat, 23 May 1998 18:13:56 GMT
From: fantome/@/usa/./net (le Fanttme)
Subject: Re: Tom Christiansen attacks the free software community (was: Re: GNU attacks on the open software community)
Message-Id: <72C02D2328B6C7CE.D23B36DB0B9516D3.10F8506F80CD3302@library-proxy.airnews.net>

On 22 May 1998 14:04:40 +0200, David Kastrup
<dak@mailhost.neuroinformatik.ruhr-uni-bochum.de> wrote:

>pudge@pobox.com (Chris Nandor) writes:
>
>> But since FSF are the ones changing the definitions, it is incumbent
>> on them to make it clear what they mean to the rest of the world.
>
>There has been a time in the United States where people associating
>the word "free" not exclusively with "gratis" were not called liars.

Only when they're talking about philosophical concepts, not objects.

Software, like it or not, is an object.

-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: 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 2704
**************************************

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