[12188] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5788 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 26 11:03:57 1999

Date: Wed, 26 May 99 08:01:30 -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           Wed, 26 May 1999     Volume: 8 Number: 5788

Today's topics:
    Re: leeches, compilers, and perl, oh my (all mine?) <gbartels@xli.com>
        My old perlscripts won't run anymore <michiel.peene@advalvas.be>
    Re: My old perlscripts won't run anymore <tchrist@mox.perl.com>
    Re: Perl "constructors" <jdporter@min.net>
    Re: Perl compiler...If or when <cmcurtin@interhack.net>
    Re: Perl compiler...If or when (Greg Bacon)
    Re: Perl module for processing dates? <mblase@ncsa.uiuc.edu>
        require problem <alfredo@ronchiato.it>
    Re: require problem <tchrist@mox.perl.com>
    Re: Searching for a \ in string (Mick Farmer)
        Sorry about the double post guys.  That's it! <devans@radius-retail.kom>
    Re: Split behaviour (Tad McClellan)
    Re: tool to trace #include statements in C/C++ <jdf@pobox.com>
    Re: Transliteration Operator Problem (Mick Farmer)
    Re: Validating a subnet mask... <devans@radius-retail.kom>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Wed, 26 May 1999 09:44:17 -0400
From: Greg Bartels <gbartels@xli.com>
Subject: Re: leeches, compilers, and perl, oh my (all mine?)
Message-Id: <374BFAB1.C669AE99@xli.com>

I R A Aggie wrote:
> 
> On Tue, 25 May 1999 16:55:36 -0400, Greg Bartels <gbartels@xli.com>, in
> <374B0E48.7855C216@xli.com> wrote:
> 
> + so the guy wants to use a free tool so he can hoard his
> + source code, so what?
> 
> He's not adding to the "public knowledgebase" of which you seem so fond.

I'm not going to give him a monocle and persian cat and make him
the bad guy in the next James Bond movie simply because he does not
"add to the public knowledgebase" (to mangle a line from Dennis Miller).
If he came in and tried to slap a copyright on some opensource code,
he'd be takingn away from the public knowledgebase, and then I'd 
put him ina black robe, give him a red lightsaber and call hiim
'darth vader', but thats not the case.

> Hoarding code is not the Perl way, either. This is what I said about it
> a while back:
> 
>         The rich culture in the Perl community exists because
>         everything is in the open.  Perl is more than _just_ a
>         programming language, and far more than the sum of its parts.
>         Hiding code just goes against that culture.

whether or not hoarding code is the perl way doesn't mean you can
tell people how to use perl.  you can't say to someone, "if you
use the perl compiler, you must make your code open-source".
well, you can say that, but it wont do anything.
 
> If you think you'll be able to protect your code thru anything but a
> lawyer and contract law, you're mistaken. Obscuring your code doesn't
> really hide it, you just make deciphering it more of a challenge.

if there is no difference between compiled and open-source code,
why has everyone gotten up in arms about someone wanting to compile
their copyrighted code?
 
> + we all take benifit from those who came before us.
> + is that leaching?
> 
> Until you give back, yes. That's not necessarily a bad thing, in the
> learning stages.
> 
> + I say we all stand on the shoulders of giants.
> 
> We are all giants, we just don't know it yet...
> 
> James

Copyright will never go away. even as open-source code replaces
commercial software, there will still be a market for for-profit
software. if someone uses open-source code to create some
for-profit code, and copyrights his code, they can do with their
code what they wish.

the perl culture you describe is a choice you can make for yourself.
you can even decline to help those you feel are against that culture.
but sitting around making people the bad guy for not following your
culture accomplishes nothing.  the only method of enforcing a view
on someone else if to change the legal system, which means you
might change the law to say all copyrighted material must be 
open-source. otherwise, you have no recourse to enforce open-source
on anyone else.

most of the 'leech' and 'compiler' threads were about what people
'should' or 'should not' do (this one included), rather than being
about perl solutions. I've merely been trying to point this out,
so that when something similar comes up, rather than rehash old
arguments, people could just refer the 'non-perl-culture' person
to some URL or FAQ that explains the perl culture's view of things.

someone sends in a message saying:
"I want to compile my code to hide the source code"
and this generating a million reply's saying,
"you shoudnt do that, and the reasons are ..."
followed by more replies of
"I should be able to and here's why ..."
and the messages go on and on, dancing around the
same issue. kind of like this thread.

ideally, what would happen is someone would post a message
"I want a compiler to hide my code"
and they would get a million messages saying
"please read the document at: http://www.perl.org/open-source.html"
and that would be the end of it.

(one of these days, I'll get a web page for myself,
and just refer to that.)

Greg


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

Date: Wed, 26 May 1999 14:14:06 GMT
From: Michiel Peene <michiel.peene@advalvas.be>
Subject: My old perlscripts won't run anymore
Message-Id: <7igvjb$pr0$1@nnrp1.deja.com>

Hi,
I got the following problem:

I was using ActiveWare Perl version 5.003 on an NT4 server. All my
scripts ran well, until I needed to upgrade to the latest version:
ActiveState 5.00503 (build 516).
Since then I got the error message ERROR: Parse Exception
The solution for that was to completely remove Perl and reinstall the
latest version. This all worked fine. Althoug! My new scripts (those
that needed the new version of Perl) work fine, but my old scripts
refuse to work.
I always get the following message in my browser:
#####
Server Error

This server has encountered an internal error which prevents it from
fulfilling your request. The most likely cause is a
misconfiguration. Please ask the administrator to look for messages in
the server's error log.
#####
and the webserver (netscape 3.51) error.log looks like that
#####
[26/May/1999:15:08:57] failure: for host xxx.xxx.xxx.xxx trying to GET
/webmail/login.pl, cgi-parse-output reports: the CGI program
C:\Perl\bin\perl.exe did not produce a valid header (program terminated
without a valid CGI header (check for core dump or other abnormal
termination)
#####
When I run the script form the command line, it gives me the whole HTML
as output without any errors!

Can anybody tell me what I'm doing wrong, or what I need to do to fix
it?

Thanks a lot,
Michiel Peene



--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: 26 May 1999 08:23:15 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: My old perlscripts won't run anymore
Message-Id: <374c03d3@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    Michiel Peene <michiel.peene@advalvas.be> writes:
:[26/May/1999:15:08:57] failure: for host xxx.xxx.xxx.xxx trying to GET
:/webmail/login.pl, cgi-parse-output reports: the CGI program
:C:\Perl\bin\perl.exe did not produce a valid header (program terminated
:without a valid CGI header (check for core dump or other abnormal
:termination)

If you head down the block two doors on the right, you'll find a web
group or two.  Please check there.  Your problem is not related to Perl.

--tom
-- 
    That means I'll have to use $ans to suppress newlines now.  
    Life is ridiculous. 
        --Larry Wall in Configure from the perl distribution


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

Date: Wed, 26 May 1999 13:51:23 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl "constructors"
Message-Id: <7igu8q$oso$1@nnrp1.deja.com>

In article <927680311.575832@localhost>,
  zenin@bawdycaste.org wrote:
>
> 99.9% of the time, anyone setting __DIE__ to sub { exit } should be
> fired, outright.
>
> In practice, this is not a problem.

No, in practice, it is extremely much of a problem, particularly
for those of us who are used to using CGI::Carp.

Hmm, I *thought* I threw Exception::Mine->new( @problems ),
but what I caught was:
[Wed May 26 09:49:26 1999] jamaica.cgi: Exception::Mine=HASH(0xc6e30) at
 ./jamaica.cgi line 102.

--
John Porter
Put it on a plate, son.  You'll enjoy it more.


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: 26 May 1999 10:45:47 -0400
From: Matt Curtin <cmcurtin@interhack.net>
Subject: Re: Perl compiler...If or when
Message-Id: <xlxaeurdh44.fsf@gold.cis.ohio-state.edu>

>>>>> On 25 May 1999 11:58:35 -0700,
    Tom Christiansen <tchrist@mox.perl.com> said:

Tom>     The average American sits on his butt more than 20 hours a
Tom> week doing nothing but watching television.

What's television?

-- 
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/


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

Date: 26 May 1999 14:59:20 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Perl compiler...If or when
Message-Id: <7ih288$d7s$1@info2.uah.edu>

In article <374B2A3E.78EC13FC@my-dejanews.com>,
	Corus <corus@my-dejanews.com> writes:
: The day Science turns around and shoots Capitalism in the foot is the
: day it points the same gun to its head and pulls the trigger.

More FUD.  Strike three; you're out.

You know, you look like Tyson when you're fighting a straw man.

Greg
-- 
Sam:  What's new, Normie? 
Norm: Terrorists, Sam. They've taken over my stomach. They're demanding beer. 


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

Date: Wed, 26 May 1999 09:29:21 -0500
From: Marty Blase <mblase@ncsa.uiuc.edu>
Subject: Re: Perl module for processing dates?
Message-Id: <374C0541.8D3D5DBB@ncsa.uiuc.edu>



lamj@softhome.net wrote:
> 
> Are there any Perl Module that test if a date is valid? Eg. 30th, Feb is
> not valid and 30th, Apr is not valid.
> 
> The reason I am asking this is because I want to write a script that
> will count things as a month, think of it as an accounting prog. Billing
> date start on 31st of every month. Today is 31st and last month does not
> have 31st but only 30th, so the billing starts on 1st of current month,
> right?

You should find something you need at
(http://reference.perl.com/query.cgi?time). Perhaps the Time::DaysInMonth
module is what you need.


- mb


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

Date: Wed, 26 May 1999 15:29:29 +0200
From: alfredo <alfredo@ronchiato.it>
Subject: require problem
Message-Id: <374BF739.4B16A120@ronchiato.it>

When I use command -> require "script.pl"; an error appair : internal
server error !
Someone can help me ? How do I do for use this command ?

Thanks



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

Date: 26 May 1999 08:21:48 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: require problem
Message-Id: <374c037c@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    alfredo <alfredo@ronchiato.it> writes:
:When I use command -> require "script.pl"; an error appair : internal
:server error !
:Someone can help me ? How do I do for use this command ?

If you head down the block two doors on the right, you'll find a web
group or two.  Please check there.  Your problem is not related to Perl.

--tom
-- 
    "Most of what I've learned over the years has come from signatures."
    	--Larry Wall


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

Date: Wed, 26 May 1999 13:38:08 GMT
From: mick@picus.dcs.bbk.ac.uk (Mick Farmer)
Subject: Re: Searching for a \ in string
Message-Id: <FCCDvK.44y@mail2.ccs.bbk.ac.uk>

Dear John,

You need to escape the characters you are trying to match.
Control-A is best expressed in octal as \001, Backslash is
expressed as \\.  So your regular expression is

	/\001\\/

Regards,

Mick


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

Date: Thu, 20 May 1999 16:30:09 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Sorry about the double post guys.  That's it!
Message-Id: <7i1cs5$64jf3@news.gomontana.com>

Eeek what happened there?  Double post?  Sorry!

Dave Evans wrote in message <7i1btf$5stq4@news.gomontana.com>...
>[mailed+posted]
>
>This depends on your shell, i.e. whether you're using a DOS prompt on a
> blah blah blah




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

Date: Wed, 26 May 1999 04:55:46 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Split behaviour
Message-Id: <iucgi7.e7m.ln@magna.metronet.com>

Rod Munro (Rod.Munro@ibm.net) wrote:

: Is this behaviour of split correct?


   Yes.


: @x =  split(/^([^:]+):\s*/m, "field: value here");
: results in
: @x = ['','field','value here'];

: Some examples of split seem to indicate that this would give 2 items not 3,
: the empty field being ignored.


   Some examples must have been given by folks too busy to read
   about the function that they are using.

   The *second sentence* of the description of split() in perlfunc.pod
   says:

      "By default, empty leading fields are preserved, 
       and empty trailing ones are deleted."


: What is the correct result?


   perl matched the field separator at the beginning of the string,
   so there is an empty field before that separator.

   So perl is telling you what the correct result is  :-)


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 26 May 1999 10:16:40 -0400
From: Jonathan Feinberg <jdf@pobox.com>
To: tchrist@mox.perl.com (Tom Christiansen)
Subject: Re: tool to trace #include statements in C/C++
Message-Id: <m3yaibud9z.fsf@joshua.panix.com>

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

> Note that because Linux and gcc broke the Unix world, it doesn't
> work so well there, but it's still fine on regular systems.

Desperately seeking a gloss for that meme.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Wed, 26 May 1999 13:31:08 GMT
From: mick@picus.dcs.bbk.ac.uk (Mick Farmer)
Subject: Re: Transliteration Operator Problem
Message-Id: <FCCDJw.3uq@mail2.ccs.bbk.ac.uk>

Dear Bill,

You can't use the tr function for that purpose.  As its name 
implies, tr is for character translation.  You should use
the substitution operator, s, instead.  Try something like
this.

	$pulled =~ s!/!www.site.com/!;

Regards,

Mick


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

Date: Thu, 20 May 1999 15:44:27 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: Validating a subnet mask...
Message-Id: <7i1a6f$646b2@news.gomontana.com>

[mailed+posted]

The re /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ will match a string consisting of four
decimal numbers separated by dots.  The numbers are then in the variables
$1, $2, $3, and $4.  Read perldoc perlre to understand why this works.

You will then have to employ whatever other additional rules there are which
determine whether the actual numbers are valid, e.g. at least they must all
be between 0 and 255.

e.g.

my $ip = "255.255.0.0";
$ip =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ or die "Invalid ip address/mask";
die "Number out of range" if $1>255 or $2>255 or $3>255 or $4>255;
print "$ip looks good so far!\n";
# your rules go here....

Mitch wrote in message <3743A51D.A67E1758@home.com>...
>I need to validate the subnet mask inputed by the user based on some ip
>address.  So if you user typed in IP 205.217.218.67, and then typed in
>255.55.255.0, the ip address should obviously be wrong, and the error
>returned to the user.
>
>Solutions I've tried.  I started out with making sure everything was a
>digit.  Then obviously that failed cuz 255.55.255.0 will work.
>
>Seeing that I'm bad with regular expressions and matching, could someone
>help me with figuring this one out?
>
>Thanks, Mitch
>



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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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