[12301] in Perl-Users-Digest
Perl-Users Digest, Issue: 5901 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jun 5 21:07:15 1999
Date: Sat, 5 Jun 99 18:00:16 -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, 5 Jun 1999 Volume: 8 Number: 5901
Today's topics:
Defining array names according to loop <james@britlinks.co.uk>
Re: Defining array names according to loop <rootbeer@redcat.com>
Re: Defining array names according to loop <james@britlinks.co.uk>
Re: Defining array names according to loop (Ronald J Kimball)
File upload/download Web app. (Jen)
Re: File upload/download Web app. <rootbeer@redcat.com>
Re: how do i fucking run perl w32 (Ronald J Kimball)
Re: I'm looking for some virgin men, send me a message <gellyfish@gellyfish.com>
Re: I'm looking for some virgin men, send me a message (Ronald J Kimball)
Re: It don't work ! What are my mistakes ??? (Ronald J Kimball)
Re: know Perl to maintain Perl (was: Re: I pass an arra (Ronald J Kimball)
Looking for special upload script <MeinAlias@T-Online.de>
Re: Need help with script <rootbeer@redcat.com>
Re: perl script to munge (Ronald J Kimball)
Re: Perl, Y2K, and idiots <gellyfish@gellyfish.com>
Re: split strings (Tad McClellan)
Re: The artistic license and perl: (Kai Henningsen)
Re: The artistic license and perl: (Kai Henningsen)
Re: The artistic license and perl: <rra@stanford.edu>
Re: Using Or to evaluate multiple values (Larry Rosler)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 5 Jun 1999 23:11:45 +0100
From: James Stewart <james@britlinks.co.uk>
Subject: Defining array names according to loop
Message-Id: <ant052245345Lh==@ch0128.charis.co.uk>
I have an array, each element of which contains a line of fields separated
by colons. I want to split each line according to the colon into
separate arrays, with each field as a different element. For example:
if $array[0] contains "james:stewart:kent:uk"
I'd like $arrayone[0] to contain "james", $arrayone[1] to contain "stewart"
etc.
I can do this for particular lines, but I want to go through the whole
array and split each line into a different array, numbered numerically,
and the size of the array depends on the number of lines in the file I'm
reading from.
I thought about setting up a for...to loop, but wasn't sure how to give
each array a unique name each time around, presuming that calling
an array @array$loop (to be @array0, @array1, @array2) isn't legal.
Can anyone suggest how to do this, suggest an alternative way round or
point me to a relevant FAQ (I've checked a few but haven't found what
I want)?
cheers. James.
--
James Stewart - james@britlinks.co.uk | "Telecom ignored us and
The Britlinks - http://www.britlinks.co.uk | democracy has died."
Phantom Tollbooth - http://www.tollbooth.org | -- Fat And Frantic
Sixpence None The Richer in the UK - http://www.britlinks.co.uk/sixpence/
------------------------------
Date: Sat, 5 Jun 1999 15:33:47 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Defining array names according to loop
Message-Id: <Pine.GSO.4.02A.9906051523021.1103-100000@user2.teleport.com>
On Sat, 5 Jun 1999, James Stewart wrote:
> if $array[0] contains "james:stewart:kent:uk"
>
> I'd like $arrayone[0] to contain "james", $arrayone[1] to contain
> "stewart" etc.
I wonder whether you want a (pseudo-)multi-dimensional array. So,
$array[0][0] would have "james", $array[0][1] would have "stewart", and so
on.
> I can do this for particular lines, but I want to go through the whole
> array and split each line into a different array, numbered
> numerically, and the size of the array depends on the number of lines
> in the file I'm reading from.
my @array;
while (<FILE>) {
chomp;
push @array, [ split /:/ ];
}
Something like that, perhaps? The perlref manpage (and perllol and
perldsc) may be of some help. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sat, 5 Jun 1999 23:58:50 +0100
From: James Stewart <james@britlinks.co.uk>
Subject: Re: Defining array names according to loop
Message-Id: <ant05225006cLh==@ch0128.charis.co.uk>
In article <Pine.GSO.4.02A.9906051523021.1103-100000@user2.teleport.com>,
Tom Phoenix <URL:mailto:rootbeer@redcat.com> wrote:
> On Sat, 5 Jun 1999, James Stewart wrote:
>
> > if $array[0] contains "james:stewart:kent:uk"
> >
> > I'd like $arrayone[0] to contain "james", $arrayone[1] to contain
> > "stewart" etc.
>
> I wonder whether you want a (pseudo-)multi-dimensional array. So,
> $array[0][0] would have "james", $array[0][1] would have "stewart", and so
> on.
That might do it.
> > I can do this for particular lines, but I want to go through the whole
> > array and split each line into a different array, numbered
> > numerically, and the size of the array depends on the number of lines
> > in the file I'm reading from.
>
> my @array;
> while (<FILE>) {
> chomp;
> push @array, [ split /:/ ];
> }
>
> Something like that, perhaps? The perlref manpage (and perllol and
> perldsc) may be of some help. Good luck!
thanks. I'm grabbing the files at the moment.
James.
--
James Stewart - james@britlinks.co.uk | "Telecom ignored us and
The Britlinks - http://www.britlinks.co.uk | democracy has died."
Phantom Tollbooth - http://www.tollbooth.org | -- Fat And Frantic
Sixpence None The Richer in the UK - http://www.britlinks.co.uk/sixpence/
------------------------------
Date: Sat, 5 Jun 1999 19:44:25 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Defining array names according to loop
Message-Id: <1dsxvbx.1nwf93j15ja9haN@[207.60.170.186]>
James Stewart <james@britlinks.co.uk> wrote:
> I thought about setting up a for...to loop, but wasn't sure how to give
> each array a unique name each time around, presuming that calling
> an array @array$loop (to be @array0, @array1, @array2) isn't legal.
You should read the following documentation:
perllol
perlref/perlreftut
perldsc
HTH! Come on back if you're still having problems.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sat, 05 Jun 1999 22:17:03 GMT
From: jenmei@my-dejanews.com (Jen)
Subject: File upload/download Web app.
Message-Id: <3759a050.8236333@client.nw.news.psi.net>
We have a situation at work where peopl want to send and receive
e-mail messages with huge attachments. We really want to prevent
people from doing this (so that the mail servers don't get stuffed),
but we want to provide a good alternative. FTP is apparently too hard
for people to use.
What I was thinking of doing is creating a Web site (using Perl) where
employees and customers could upload and download files from. However,
if something like this is available somewhere, I'd rather get it than
create something new from scratch. Does something like this exist?
Thanks!
Jen
jenmei@my-dejanews.com
------------------------------
Date: Sat, 5 Jun 1999 15:22:20 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: File upload/download Web app.
Message-Id: <Pine.GSO.4.02A.9906051522020.1103-100000@user2.teleport.com>
On Sat, 5 Jun 1999, Jen wrote:
> if something like this is available somewhere, I'd rather get it than
> create something new from scratch. Does something like this exist?
If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sat, 5 Jun 1999 19:44:26 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: how do i fucking run perl w32
Message-Id: <1dsxvmj.w8i4rj12jvi68N@[207.60.170.186]>
Larry Rosler <lr@hpl.hp.com> wrote:
> In article <375958E6.34DA4FF5@mcmahon.qal.berkeley.edu> on Sat, 05 Jun
> 1999 10:05:42 -0700, Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
> says...
> ,,,
> > 'How do I *^%$(*&^% run perl w32?'
> > As in, s/\*\^\%\$\(\*\&\^\%/$expletive/;
>
> More colloquially,
>
> 'How do I *^%$(*&^% run perl w32?'
> As in, s/\Q*^%$(*&^%/$expletive/;
>
> :-)
But less correct. :-(
#!/usr/local/bin/perl
$_ = 'How do I *^%$(*&^% run perl w32?';
s/\Q*^%$(*&^%/$expletive/;
print "$_\n";
__END__
How do I *^%$(*&^% run perl w32?
Unfortunately, $( is interpolated before the \Q takes effect.
Even more unfortunately, /\Q*^%\$(*&^%/ doesn't work either, because \$
is _not_ interpolated before \Q.
It seems that it is in general impossible to use \Q and $ together in a
regex to match just a literal $.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
perl -e '$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'
------------------------------
Date: 5 Jun 1999 23:19:43 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I'm looking for some virgin men, send me a message and what you're in to.
Message-Id: <7jcbaf$4sd$1@gellyfish.btinternet.com>
On 5 Jun 1999 18:23:38 GMT Jen Balcmon wrote:
> I'm looking for some virgin men, send me a message and what you're in to.
>
I think you might have wrong group - or maybe not ...
Or
We're into Perl. Why what are you into ?
Or
I've got some wicker effigies of men if that will help you through the night.
Or
I blame the parents
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 5 Jun 1999 19:44:33 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: I'm looking for some virgin men, send me a message and what you're in to.
Message-Id: <1dsxxin.1u8c524du2o25N@[207.60.170.186]>
Jen Balcmon <joey@hecnyyvr.com> wrote:
> I'm looking for some virgin men, send me a message and what you're in to.
By definition, virgin men have not been "into" anything.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sat, 5 Jun 1999 19:44:34 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: It don't work ! What are my mistakes ???
Message-Id: <1dsxxno.1de0sh44rf772N@[207.60.170.186]>
Bruno Baguette <bruno.baguette@francemel.com> wrote:
> Here is the full source :
>
> # I read the data send to me by a form with a POST method
>
> &ReadParse(*input);
>
> [...]
If that's really the full source, then the ReadParse function was never
defined.
I expect you meant to require 'cgi-lib.pl'. Better than that, though,
would be to use CGI.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sat, 5 Jun 1999 19:44:27 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: know Perl to maintain Perl (was: Re: I pass an array...)
Message-Id: <1dsxx9n.xzbbkf3h8s66N@[207.60.170.186]>
Tom Christiansen <tchrist@mox.perl.com> wrote:
> In comp.lang.perl.misc,
> rjk@linguist.dartmouth.edu (Ronald J Kimball) writes:
> :How much Perl does someone have to know before they're allowed to use
> :it?
>
> How much Perl is considered off-limits to a Perl virtuoso
> because Visual BASIC immigrants would be confused?
That depends on how many Visual BASIC immigrants the Perl virtuoso is
coding for.
> How much English is considered off-limits to an English virtuoso
> because Polish immigrants would be confused?
That depends on how many Polish immigrants the English virtuoso is
speaking to.
> How much Liszt is considered off-limits to a piano virtuoso
> because harmonica immigrants would be confused?
That depends on how many harmonica immigrants the piano virtuoso is
composing for.
Of course, "off-limits" is not the best term here. If you can explain
all the Perl code/English speech/Liszt music such that the Visual
BASIC/Polish/harmonica immigrants can understand it, then none of it is
off-limits. If you can't explain it, you can still use it, as long as
none of the immigrants are expected to understand it.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 6 Jun 1999 00:22:52 +0200
From: "Martin" <MeinAlias@T-Online.de>
Subject: Looking for special upload script
Message-Id: <7jc80u$pt6$1@newsreader.ipf.de>
Hello,
befor starting to hack my own: anybody knows of an file upload script which
offers a preview function for Gifs and Jpegs to be uploaded via the browser?
Tips are greatly appreciated.
Regards from Heidelberg
Martin
--
__________________________
Martin Knapp
martin.knapp@adf.de
------------------------------
Date: Sat, 5 Jun 1999 16:25:18 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Need help with script
Message-Id: <Pine.GSO.4.02A.9906051558460.1103-100000@user2.teleport.com>
On Sat, 5 Jun 1999, Neil Sandow, Pharm.D. wrote:
> Subject: Need help with script
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
> #!/usr/bin/perl
It's generally advisable to use -w and 'use strict' so that Perl will try
to let you know what's going wrong with your code.
> open(W,"$wordsfile");
Those quote marks are merely misleading.
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.
> $SAVEBACKUP && $VERBOSE && print "Saving Backups while processing.\n";
This use of those operators as control structures is mostly more confusing
than it's worth. The exception is when checking return values and using
"or die"-type constructs. I'd write that line like this, perhaps:
print "Saving Backups while processing.\n"
if $SAVEBACKUP and $VERBOSE;
But consider making those two variables true constants (with or without
the 'use constant' pragma), since then Perl can optimize away some
unneeded code.
> opendir DIR, ".";
This is another case where you should be checking the return value. It may
seem surprising - how could it be that you can't open the current
directory? But the permissions could be set to disallow reading.
> while ($thisfile = readdir(DIR)) {
Of course, despite the name, it may be a directory or some other non-file.
> if ($thisfile =~ /\.htm[l]?$/) {
> $kount++;
> $VERBOSE && print "$kount Processing $thisfile...\n";
> open (H,"$thisfile");
> $linekount = @lines = <H>;
> close H;
>
> open (NEWH,">$thisfile");
This just wiped out the file, right? (But you've still got the data in
@lines.)
> $SAVEBACKUP && open (BCK,">$thisfile.bak");
Why not do this, instead? First, open the file for reading. Then, if you
want a backup, rename it to the backup file name; if you don't, simply
unlink it. (This is Unix-dependent, however.) Now open the original name
for output. You can copy lines of input (still coming from the original
file) to the output (the new file with the original name), and if your
program crashes halfway, you'll still have the backup file (if you wanted
it). In fact, perl makes this easy to do with the $^I variable.
> &printJavaScript();
> foreach $line (@lines) {
> $SAVEBACKUP && print BCK "$line";
> foreach $word (@wordlist) {
> $line =~ s/[\n ]$word[\n., ]/ <a
> href=javascript:defwindow('$word')>$word<\/a> /;
You're recompiling the pattern many _many_ times (number of words x number
of lines x number of files). And since some words may be hidden within
larger words, or may appear more than once per line, I'm not sure that
that's doing what you want, anyway. For example, if 'window' is one of the
words, you could replace 'defwindow' with something you didn't intend.
Maybe this is better?
my $pattern = join '|', @wordlist; # Near top of progam
$line =~ s{\b($pattern)\b}
{ <a href=javascript:defwindow('$1')>$1</a> }go;
Well, that should get you started. Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sat, 5 Jun 1999 19:44:35 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: perl script to munge
Message-Id: <1dsxyb5.csvbs21w4awx0N@[207.60.170.186]>
<cmeli@cis.um.edu.mt> wrote:
> Is there any ready-made perl script to munge all or particular
> emails within a text file (e.g. a mailing list digest which is going to
> be automatically posted to usenet) ?
This should munge just about any file you give it:
perl -pi.bak -e 's/(.)/$1 ^ chr rand 0x7F/ge;'
[You'll probably want to verify that the file was munged properly before
you delete the backup that this makes.]
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: 5 Jun 1999 21:14:51 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl, Y2K, and idiots
Message-Id: <7jc40b$4rt$1@gellyfish.btinternet.com>
On Sat, 05 Jun 1999 11:19:24 -0700 David Cassell wrote:
> Someone here a couple weeks ago was asking about Matt's
> formmail [IIRC] script, and when one of the regulars looked
> he found that the script had some serious flaws including
> a major Y2K bug just waiting to happen because the author
> hadn't understood the output of localtime().
>
I think it was wwwboard.pl - I checked out formmail as the result of an
earlier post today and I found it was OK in this respect :
# Get the current time and format the hour, minutes and seconds. Add #
# 1900 to the year to get the full 4 digit year. #
($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6]
;
$time = sprintf("%02d:%02d:%02d",$hour,$min,$sec);
$year += 1900;
# Format the date. #
$date = "$days[$wday], $months[$mon] $mday, $year at $time";
But of course that could have been a stealth fix since we started 'outing'
the offenders (and have I got a bunch of stuff to report ).
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 5 Jun 1999 13:44:58 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: split strings
Message-Id: <qmnbj7.n7l.ln@magna.metronet.com>
Allan M. Due (All@n.due.net) wrote:
: Tad McClellan <tadmc@metronet.com> wrote in message
: news:ce4bj7.94l.ln@magna.metronet.com...
: : Kevin (mpajot@club-internet.fr) wrote:
: :
: : : I just want to split a string on the "space" ((...)=split(/ /,
: $string,2)),
: : : but there is a problem when 2 paces follows themselves ("toto toto
: toto"
: : : for exemple).
: :
: : (...)=split(/ +/, $string,2);
: : ^
: : ^ split on one or more space characters
: Actually, for this I prefer
: (...)=split(' ',$string,2);
: In no way better, but since someone went to the trouble of making this an
: option it somehow just seems more perlish to me. Thankfully TIMTOWTDI.
It does not do the same thing in general, only in the
specific case presented.
You use the one that has the semantic that you want.
He didn't make any mention of tab characters, for instance,
so my solution does not split on tab characters whil yours does.
split(' ') is much more similar to split(/\s+/) than it is
to split / +/.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 05 Jun 1999 22:06:00 +0200
From: kaih=7IIwMjk1w-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: The artistic license and perl:
Message-Id: <7IIwMjk1w-B@khms.westfalen.de>
rra@stanford.edu (Russ Allbery) wrote on 04.06.99 in <ylvhd393wi.fsf@windlord.stanford.edu>:
> And note that the Open Source Definition does *not*
> talk about the use of the item, and in private e-mail with Eric Raymond
> that's apparently *intentional* and it's *expected* that someone can
> change a licensing fee per use.
Interesting claim, given that Eric was, IIRC, not even involved in
drafting that definition in the first place. Or did he finally write a
differing version?
You do remember that this definition started out as the Debian Free
Software Guidelines, right?
Looking over the DFSG, it *does* talk about use. Which matches my memory.
Time to look at the Open Source version ... nope, still talks about use.
And I don't remember there being any intention not to talk about use,
either, back when we discussed it on debian-devel (IIRC), and when I voted
on it. I certainly would have voted against anything intended to allow
charging a per-use licensing fee!
But feel free to consult the archives at <http://www.debian.org/Lists-
Archives/>.
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: 05 Jun 1999 22:14:00 +0200
From: kaih=7IIwMn6mw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: The artistic license and perl:
Message-Id: <7IIwMn6mw-B@khms.westfalen.de>
chip@perlsupport.com (Chip Salzenberg) wrote on 02.06.99 in <7j49m2$1ln$1@hoon.streaker.org>:
> According to Greg Bartels <gbartels@xli.com>:
> >It seems that the artistic license aint so great after all:
>
> The AL is great, except for people who have internalized the GPL.
>
> >http://www.oreilly.com/catalog/opensources/book/perens.html
>
> Bruce Perens? It is to laugh.
Bruce *is* a weird guy, but he also achieved some impressive things - such
as doing a lot of the work of drafting the Debian Free Software
Guidelines, which later became known as the Open Source definition.
I think the stress of being Debian Project Leader (which he became shortly
before I joined Debian) was too much for him. He started out as a very
nice and competent guy, but near the end he had become highly erratical.
Too bad, really.
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: 05 Jun 1999 16:03:30 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: The artistic license and perl:
Message-Id: <ylemjq9rnh.fsf@windlord.stanford.edu>
Kai Henningsen <kaih=7IIwMjk1w-B@khms.westfalen.de> writes:
> rra@stanford.edu (Russ Allbery) wrote:
>> And note that the Open Source Definition does *not* talk about the use
>> of the item, and in private e-mail with Eric Raymond that's apparently
>> *intentional* and it's *expected* that someone can change a licensing
>> fee per use.
> Interesting claim, given that Eric was, IIRC, not even involved in
> drafting that definition in the first place.
My understanding is that it is, at this point, intentional. Eric didn't
know whether it was originally intention in the Debian guidelines. I need
to follow up on that e-mail conversation, since some of the implications
are rather interesting.
> Looking over the DFSG, it *does* talk about use. Which matches my
> memory. Time to look at the Open Source version ... nope, still talks
> about use.
Where? That contradicts both reading.
Point 1 is the specific point I'm concerned with. It's the point that
requires one not charge royalties for further distribution of the source
code (in other words, if Perl is covered under an Open Source license and
you distribute it to me, you cannot require me to pay a royalty for each
person I distribute it to).
My reading of the Open Source definition is that one can charge a fee per
use of the software and provided you supply the source code and allow
redistribution of the source code, you're still compliant. In other
words, an Open Source license that requires everyone *using* the software
or any work derivative of it to pay you money per use, but gives them free
access to the source code, would comply with the definition.
I wrote Eric privately and presented this interpretation, and his response
seemed to indicate to me that he agreed with my interpretation and had no
problems with that implication of the OSD.
The particularly interesting thing about the above scenario is that it's
specifically forbidden by the GPL, the Mozilla Public License, and the QPL
and inconsistent with the BSD license and the X Consortium license. In
other words, it's forbidden by *every* explicitly listed Open Source
license *except* the Artistic License (among those it applies to -- the
BSD and X Consortium licenses fall into a separate category because they
essentially put no restrictions at all on what someone can do with the
software).
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Sat, 5 Jun 1999 17:48:18 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Using Or to evaluate multiple values
Message-Id: <MPG.11c3652c460cefd8989b76@nntp.hpl.hp.com>
In article <m36752v26t.fsf@moiraine.dimensional.com> on 05 Jun 1999
14:10:18 -0600, Daniel Grisinger <dgris@moiraine.dimensional.com>
says...
> Bruno Girin <bruno@toutatis.demon.co.uk> writes:
>
> > Try the following:
> >
> > elsif (($DATA{'city_text'} || $DATA{'city'}) =~ /^(MOUNT EDEN|SUNOL)$/ )
> > {
> > print "Cities in Alameda County Rock!\n";
> > }
>
> bzzzzt!
>
> @DATA{qw/city_text city/} = ( 'uh-oh', 'MOUNT EDEN' );
>
> Next, please.
That's not Bruno's fault, Daniel. That problem was in the original
post. Essentially, it uses the value of $DATA{city_text} if true,
otherwise $DATA{city}, so if you reverse your values (as I did in my
test), it works.
But the problem with the regex solution is that it doesn't scale well to
many cities in the lookup. It is O(N) in the number of cities, whereas
a hash access is O(1), if the hash setup time is amortized by many uses.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
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 5901
**************************************