[8800] in Perl-Users-Digest
Perl-Users Digest, Issue: 2417 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 25 11:02:57 1998
Date: Sat, 25 Apr 98 08:00:39 -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, 25 Apr 1998 Volume: 8 Number: 2417
Today's topics:
Re: [Q] Making Money with PERL/CGI?? <wpshaf@gte.net>
Re: Allowing only one script to access a script on a di (Andrew M. Langmead)
Re: Auto-generate HTML Tables (Jonathan Stowe)
Re: best way to find disk space for a directory otis@POPULUS.net
Re: Bug in list assign? (Mark-Jason Dominus)
Re: commenting a whole block? (Stefan Berglund)
Re: Defending Perl (Stuart McDow)
EMACS that uses PERL ? (Franz Kaufmann)
Re: foreach question (Jonathan Stowe)
getting the last element position in multi dimentional <jong@salt2.med.harvard.edu>
Re: getting the last element position in multi dimentio <jdf@pobox.com>
Re: getting the last element position in multi dimentio (Mark-Jason Dominus)
Re: Grabbing a webpage with Perl (with https) (Jonathan Stowe)
Re: How to get times in different timezones? (M.J.T. Guy)
Inter-dependenies of subs. (Etienne Grossmann)
ls -R ? jon@blading.com
Re: ls -R ? <jdf@pobox.com>
Re: New: Command Line Tool for Format Conversion (Jonathan Stowe)
Re: Perl classes or training <merlyn@stonehenge.com>
Perl Complier <bdwornick@usa.net>
Re: Please stop and help. <bugking@usa.net>
Question on sorting <bugking@usa.net>
Re: RMS should be invited to O'Reilly's "Free Software (Andrew M. Langmead)
Re: RMS should be invited to O'Reilly's "Free Software <seniorr@teleport.com>
Re: RMS should be invited to O'Reilly's "Free Software <ben@hayamasa.demon.co.uk>
Re: scalar assignment (M.J.T. Guy)
Re: Sendmail library (Jonathan Stowe)
Re: skipping ahead in a foreach loop (Andrew M. Langmead)
System call in Perl not working <gurjale.arun@worldnet.att.net>
Re: System call in Perl not working <tchrist@mox.perl.com>
Re: System call in Perl not working <bruce@cenderis.demon.co.uk>
Re: WebMail Server ? chiumh@ms15.hinet.net
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 24 Apr 1998 19:49:56 -1000
From: "William Shaffer" <wpshaf@gte.net>
Subject: Re: [Q] Making Money with PERL/CGI??
Message-Id: <6hrt95$g35$1@gte1.gte.net>
Hi Sandra
I've had a number of contacts from individuals who have read my posts on
vorious forums and newsgroups.
I'd do a search for sites offering free PERL scripts. This week alone I
had eight request for assistance with Minivend (www.minivend.com). In all I
had 21 requests. I've installed minivend and it can be difficult to say the
least. Many people who've contacted no nothing about UNIX and when I make a
referance to "command line" the say "HUH"!
Once you have found site with PERL scripts, request the authors of the
scripts if they would list you on there site. MAny of these site are swamped
with email for assistance.
Site to contact: (Partial List)
http://www.minivend.com
http://www.arpanet.com/PerlShop
http://http://www.worldwidemart.com/scripts/
Matts Scripts Archive
http://www.getscript.com/
http://www.free-cgi.com/
http://awsd.com/scripts/webadverts/
Sandra Anderson wrote in message <35312d4d.7373143@newsreader.cais.net>...
>On Mon, 23 Mar 1998 17:42:38 GMT, wef@N0SPAM_wef.net (Wef) wrote:
>
>>((( here come the flames )))
>>
>>Are there any methods to finding clients who need custom PERL scripts
>>for the WWW??? That is, without the use of SPAM???
>>
>I don't know where you live, but papers like the Washington Post have
>lower-cost advertising vehicles (normally in technology sections) for
>people who wish to write programs. Checking the want ads is also an
>approach, as is hitting any of the dozens of help wanted sites on the
>Web. Go to Yahoo (or equivalent) and begin searching. Spam is a
>lousy idea if for no other reason than most of the people with work to
>do would reject your email on principle because it would clearly show
>that you "don't get it."
>
>Sandra
------------------------------
Date: Sat, 25 Apr 1998 06:37:24 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Allowing only one script to access a script on a different server?
Message-Id: <EryIEC.FAs@world.std.com>
"Peter" <petershane@yahoo.com> writes:
>But, there is a security issue. I want script no. 2 to be only accessible by
>script no. 1.
How about if script number one passes some value that only script
number 2 would know.
But how you implement that depends on how much security you need.
Just having script1 pass some "secret word" to script2 as an argument,
would prevent script2 from easily being called from the average user's
HTTP client, but if someone was to monitor the traffic between the two
hosts, they could determine the password.
You could maintain a list of words that both scripts would cycle
through (preferably with no apparent order between successive items),
but then you have to ensure that both hosts keep synced on which item
on the list is the "current" one. Also, since most people running HTTP
servers run everyones CGI scripts under the same userid, other users
would be able to read your list.
How about if script2 didn't pass its data back directly, but instead
called script3, which would be on the same server as script1. Then
script3 could store the data someplace where script1 would read
it. Maybe with some sort of tag given by script1 to script2 and back
to script3 so that someone doesn't try to call script1 and script3 to
try to make script1 think that it is getting data from script2. (Or
would you be better of having script2 pass the tag back to script1
directly as well as to script3?) Again, it is probably important to
have the tag be non-sequential.
For more security than that, start looking into some research done on
authentication schemes. Very often authentication is tied into the
subject of encryption. And now that I think of it, those encryption
types often say (and accurately so) "encryption is not for amateurs."
so you are probably best off forgetting all of my suggestions. They
probably all have severe holes that a determined person could work
through.
--
Andrew Langmead
------------------------------
Date: Fri, 24 Apr 1998 20:02:12 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Auto-generate HTML Tables
Message-Id: <353ff284.4803960@news.btinternet.com>
On Fri, 24 Apr 1998 11:12:06 -0600, johnvv@earthling.net wrote:
<snip>
> Has anybody created a script which automagically genetrates tables from
> complex structures or flatfiles. I would be very nice to HREF the cells in
> the process.
>
Yes, I have and I'm sure on or two others have around here as well.
However the nearest example I have takes as input some files output by
Lotus Organizer (Yeuch). And i dont think it will be quite what you
want
Just as an example here is the bit that prints the tabley bits:
sub printdetail()
{
my ($config,$room,%details) = @_;
my $m_time = "";
print " <H2>",$room,"</H2>\n" unless (lc($config->{USECATEGORY})
eq "no" )
print " <TABLE>\n";
foreach $m_time (sort keys %details )
{
my $m_description = $details{$m_time};
print <<EOPD;
<TR>
<TD>
$m_time
</TD>
<TD>
$m_description
</TD>
</TR>
EOPD
}
print " </TABLE>\n";
}
I leave it as an example to guess how you get the stuff that is
printed.
Hmm, why *did* I do it like that ?
> Its been two years since I touched cgi, I'll have more later.
>
Lucky you.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 25 Apr 1998 01:30:29 -0600
From: otis@POPULUS.net
Subject: Re: best way to find disk space for a directory
Message-Id: <6hrvu6$dp5$1@nnrp1.dejanews.com>
I like 2.
there is a module for it File::Find so you won't haev to do any backtick
system pipe stuff...
Otis
> I need to find how much disk space is used within a directory. Two
> possible ways I can go are:
>
> 1. do a `du -a -b $dir` and look at the last entry..
> 2. use find to get a list of files and then loop through and stat each
> one to get the file size.
>
> Which option is preferable? Is there a better way?
>
> Any help is really appreciated!
>
> Alex
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 25 Apr 1998 09:29:38 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Bug in list assign?
Message-Id: <6hsog2$33h$1@monet.op.net>
Keywords: capacious thesis tripoli wide
In article <wwcfge2d.fsf@mailhost.panix.com>,
Jonathan Feinberg <jdf@pobox.com> wrote:
> Array assignment in a scalar context returns the number of elements
> produced by the expression on the right side of the assignment:
>
> $x = (($foo,$bar) = (3,2,1)); # set $x to 3, not 2
Yes. However, as Tom and others in this thread have pointed out, in
this expression:
$x = (($foo) = qw(a b c d));
the `qw' produces two items ('a', 'b c d'), not four, so that the 2
assigned to x here is exactly in accordance with the documentation.
------------------------------
Date: 25 Apr 1998 09:29:42 GMT
From: f94stbe@dd.chalmers.se (Stefan Berglund)
Subject: Re: commenting a whole block?
Message-Id: <6hsae6$mre$1@eol.dd.chalmers.se>
In article <6hqd70$8oe$1@client2.news.psi.net>, abigail@fnx.com (Abigail) writes:
> Stuart Cooper (stuartc@ind.tansu.com.au) wrote on MDCXCIV September
> MCMXCIII in <URL: news:yeo4szm3fhf.fsf@kudu.ind.tansu.com.au>:
> ++ abigail@fnx.com (Abigail) writes:
> ++
> ++ In Emacs (in the Perl Mode) select the region you wish to comment.
>
> Of course, this works in vi as well. You just have to know vi.
> Goto begin of region you want to outcomment, do
> ma
> Goto end of region you want to out comment and do
> :'a,.s/^/#/
>
> Alternatively, you can work with 2 markers.
Using the excellent vi clone vim this becomes even easier.
Mark the block you want to work with in linewise visual mode (press V and use
ordinary motion commands or use the mouse)
press : (now vim will fill in start and end markers for you)
press s/^/# / and press return. Finished!
You could of course make this a mapping tied to a key to impress those
(misled?) emacs guys :-)
--
/Stefan
f94stbe@dd.chalmers.se
Life - the ultimate practical joke
finger f94stbe.pgp@dd.chalmers.se for public pgp-key
------------------------------
Date: 25 Apr 1998 13:43:53 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Defending Perl
Message-Id: <6hspap$l8n$1@ns1.arlut.utexas.edu>
ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
>
> <tchrist@mox.perl.com>] wrote
> >
> > Or code
> > up my three tasks and prove me wrong. I dare you.
>
> Thanks, I graduated my kindergarden several months ago already.
Is this argument leading anywhere? For it does look choreographed.
:-)
--
Stuart McDow Applied Research Laboratories
smcdow@arlut.utexas.edu The University of Texas at Austin
"It is obvious that about 750,000 people ago, Austin was a wonderful City."
------------------------------
Date: Sat, 25 Apr 98 11:21:57 gmt
From: ws97-868@wsrz1.wiso.uni-erlangen.de (Franz Kaufmann)
Subject: EMACS that uses PERL ?
Message-Id: <6hsa0l$lif$2@rznews.rrze.uni-erlangen.de>
Hello,
I was told that there was an emacs implementation that uses perl.
Is this true?If so is it available for unix platforms ,preferably linux?
I4d appreciate it if you answered by mail.
Thank you in advance.
------------------------------
Date: Fri, 24 Apr 1998 20:02:14 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: foreach question
Message-Id: <353ff5c7.5534792@news.btinternet.com>
On Fri, 24 Apr 1998 17:24:56 GMT, mingtian@hanmail.net (Gilly
(kEQNql)) wrote:
>
>foreach (sort (@filelist)) { .. }
>
>Does it sort each time during the loop? or only once?
Just the once when it constructs the list to feed to foreach
>
>">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">
>!F 1W4k 3*?!0T4B >pA&3* GQ<[@L 2I@L?4@84O 0q8q1f 59>F3*?@4B !F
>"> 594c ?6?!<- H/Hw 9L<RA~0m @V4B 5i2I GQ<[@L?M55 00>F ">
>!F H%@Z@V>n >5>5GQ 3*@G 0!=??! Hq8A@; @|GXAV4x 2I !F
>">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">
Love it.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 25 Apr 1998 00:22:46 -0400
From: jong <jong@salt2.med.harvard.edu>
Subject: getting the last element position in multi dimentional array
Message-Id: <35416516.955B4D29@salt2.med.harvard.edu>
Hi,
I have a multi dimentional array made by
assigning values of x y z and put a value
to it:
$array[x][y][z]
The resulting array @array has all the assigned
elements.
But I want to know the highest number of each
dimension. So, I want to know
what $array[x]
what $array[x][y]
what $array[x][y][z]
in their highest values.
If the last array element was:
$array[3][3][9]
I'like to know how to get the 3, 3, 9
in the above.
Is there a known way of doing it or impossible??
thanks a lot.
Jong
--
Jong : A biology student
Tel: 617-432-3675 (lab, I work very late, usually)
Tel: 617-432-0503 (lab, computer room)
Tel: 617-713-0990
------------------------------
Date: 25 Apr 1998 09:06:55 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: getting the last element position in multi dimentional array
Message-Id: <ra2mt2ps.fsf@mailhost.panix.com>
jong <jong@salt2.med.harvard.edu> writes:
> If the last array element was:
>
> $array[3][3][9]
>
> I'like to know how to get the 3, 3, 9
> in the above.
A negative array subscript counts from the end. Therefore, the best
practice for retrieving the last element of an array is to use the
subscript -1. So:
$array[-1][-1][-1];
will retrieve the last element of the last element of the last
element...
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: 25 Apr 1998 09:35:26 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: getting the last element position in multi dimentional array
Message-Id: <6hsoqu$347$1@monet.op.net>
Keywords: arhat fluffy Lesotho malformed
In article <35416516.955B4D29@salt2.med.harvard.edu>,
jong <jong@salt2.med.harvard.edu> wrote:
>$array[x][y][z]
>But I want to know the highest number of each
>dimension.
If you know that every row has the same number of elements, you can
do:
$x = @array;
$y = @{$array[0]};
$z = @{$array[0][0]};
----------------------------------------------------------------
Perl multidimensional arrays are not really multidimensional,
because the rows may have different numbers of items. For example:
@a = ( [1, 2, 3], [4, 5] );
Here the two rows of @a have 3 and 2 elements, respectively.
You can get the size of the first row of @a with
$size = @{$a[0]} # 3
second row of @a:
$size = @{$a[1]} # 2
>If the last array element was:
>
>$array[3][3][9]
>
>I'like to know how to get the 3, 3, 9
>in the above.
If there is a [3][3][9] element, that does not mean that there is not
also a [3][2][1000] and a [1][57][223].
------------------------------
Date: Fri, 24 Apr 1998 20:02:16 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Grabbing a webpage with Perl (with https)
Message-Id: <353ff9d3.6435836@news.btinternet.com>
On 24 Apr 1998 10:31:40 -0500, les@MCS.COM (Leslie Mikesell) wrote:
>
>Is there anything free that will grab a page via https? Or a way
>to control a browser that could do it?
>
I have a feeling the latest version of LWP support it or you always
have SSLeay. Check out CPAN.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: 25 Apr 1998 13:59:59 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: How to get times in different timezones?
Message-Id: <6hsq8v$lbr$1@lyra.csx.cam.ac.uk>
James Richardson <jamesr@aethos.co.uk.nospam> wrote:
>Peter Eddy <petere@atg.com> wrote in article <353E1B1B.A9AA7337@atg.com>...
>> Hi, I'm a Perl newbie trying to figure out how to calculate time of day
>> in various time zones taking into account daylight savings time. For
>> example, getting GMT was easy, but how do I then figure out the correct
>> time in Hong Kong if my machine's not in Hong Kong?
>
>You dont have to do any working out at all... Thats what localtime() is for.
>Localtime (at least on my UNIX system) looks at the TZ (TimeZone)
>environment variable to calculate the localtime from UTC.
>You can try setting your TZ to something like NZST-12NZDT (New Zealand)
>and check that it works.
Note that on most systems, localtime remembers the TZ value on its first
call, and doesn't look at the environment variable again (an optimisation).
So you can't refer to more than one time zone in a single Perl run
(without doing some special poking in the innards).
You need to set the TZ environment variable _before_ calling perl.
Mike Guy
------------------------------
Date: 25 Apr 1998 12:09:48 +0100
From: etienne@isr.isr.ist.utl.pt (Etienne Grossmann)
Subject: Inter-dependenies of subs.
Message-Id: <v0pvi6uphf.fsf@isr.isr.ist.utl.pt>
Hello,
I would like to know wether there is a source code analysing tool
for determining the dependencies between subs, i.e. knowing who calls
who and who is called by whom.
Thanks,
Etienne
------------------------------
Date: 25 Apr 1998 12:21:14 GMT
From: jon@blading.com
Subject: ls -R ?
Message-Id: <6hskfq$o3$1@supernews.com>
hello
i read through the recent thread concerning ways to pring the contents of
a dir (most settled on readdir() opendir() etc).
is there a way to readdir() recursively? i could find no mention in the
online docs for readdir() and unfortunately don't have my camel book close
at hand.
in any case, what i really want to do is to traverse a subtree
recursively, get the name and full path of all the files there, and their
last modified dates.
i would ultimately like to have a data file whose contexts look something
like this:
---datafile---
/home/jon/textfile Thu Jan 22 10:28:22 1998
/home/jon/anotherfile Mon Mar 23 11:59:37 1998
/home/jon/somedir/anothrefile Tue Feb 24 04:35:49 1998
------
etcetera. my current half-brained idea is to do something like:
$datefile='/home/jon/datefile';
open(DATEFILE,">$datefile") || die "can't open $datefile ";
print {DATEFILE} `ls -lR --full-time /home/jon/`;
and then parse the file name and date out of it. however, this is going
to be a great big pain in the arse because the output of the ls above is
quite ugly and doesn't print the full path to the file and the file
together. ie it prints the dir name, then below that the names of the
files in that dir.
i'm sure that there is a much better way to go about this - if you can
help, please also cc your reply to my email.
thanks
--
Jon Nathan
jon@blading.com
http://www.rupture.net/~jon
------------------------------
Date: 25 Apr 1998 09:23:23 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: jon@blading.com
Subject: Re: ls -R ?
Message-Id: <pvi6t1yc.fsf@mailhost.panix.com>
[posted and mailed]
jon@blading.com writes:
> in any case, what i really want to do is to traverse a subtree
> recursively, get the name and full path of all the files there, and their
> last modified dates.
This ought to give you some ideas. The technique for gleaning
human-readable file mod times comes from perlfaq5.
#!//c/perl/bin/perl -w
use File::Recurse; # available as part of File::Tools at CPAN
use File::stat; # standard lib
use Time::localtime; # standard lib
sub list_file {
$date_string = ctime(stat($_)->mtime);
print "$_ ($date_string)\n";
}
recurse \&list_file, '/usr/local/lib';
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Fri, 24 Apr 1998 20:02:09 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: New: Command Line Tool for Format Conversion
Message-Id: <353ff178.4535871@news.btinternet.com>
On Fri, 24 Apr 1998 11:43:10 -0500, Jean Haney <jean@square1.nl>
wrote:
>We've just released a new Command Line Tool for Windows
>and UNIX as well as a DLL for Windows which allows you to batch
>convert PostScript files into other editable vector
>formats (WMF, MIF, CGM and WPG). It's a handy tool for
>developers and an end-user version is also available.
>
<etc>
That sounds very nice but whats in it for us?
No Perl module, right?
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 25 Apr 1998 13:40:53 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
To: "Jason Lorsong" <jason.lorsong@norfolkva.ncr.com>, beske@worldnet.att.net
Subject: Re: Perl classes or training
Message-Id: <8cbttqnhoh.fsf@gadget.cscaper.com>
>>>>> "Bryan" == Bryan Beske <beske@worldnet.att.net> writes:
Bryan> Check out http://www.onsightinc.com/
Sure, but have they written bestselling Perl books? :-)
Also check out http://www.perltraining.com/, or send email to
perl-training-info@stonehenge.com for an autoreply.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 129 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Sat, 25 Apr 1998 14:54:51 GMT
From: Brian Dwornick <bdwornick@usa.net>
Subject: Perl Complier
Message-Id: <3541F864.8DAA7072@usa.net>
I am looking for a perl compiler or a program that will let me write
perl and then give me the output of my script without having to upload
it... Win95... I have perl 5 on my system...
But i don't have a cgi server
Brian
------------------------------
Date: Sat, 25 Apr 1998 13:09:16 +0800
From: "Bug" <bugking@usa.net>
Subject: Re: Please stop and help.
Message-Id: <354170ad.0@ruby.hknet.com>
you don't need to compile the perl file
the perl is a interperter. you only need to upload it to the unix and run it
Jason Hall <6<g)s$e39 <6hrfas$grf$1@nntp.smartdna.com>...
>I just had my website hosting company add a cgi-bin directory
>to my site and said it is working. The server is unix and I am
>running win 95. I do not have telnet access.
>
>My question: How do I compile a perl script on my win95
>machine in order to ftp it to the unix server so it will work?
>
>Thanks in advance!
>
>Jason Hall
>
>***** Earn Free Stuff Everyday at *****
>**** http://www.earnfreestuff.com *****
>
>
------------------------------
Date: Sat, 25 Apr 1998 13:12:02 +0800
From: "Bug" <bugking@usa.net>
Subject: Question on sorting
Message-Id: <35417155.0@ruby.hknet.com>
==== a.txt ====
Aqua::Barbie Girl::1
Aqua::Doctor Jones::4
Aqua::Happy Boys And Girls::3
=============
I've a text file like above. I want to get the data out and sort them in
decending order. How to perform this? e-mail to bugking@usa.net
------------------------------
Date: Sat, 25 Apr 1998 05:30:16 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <EryFAG.Jur@world.std.com>
Sam Steingold <sds@usa.net> writes:
>AFAIK, the copyright *holder* can do whatever he wants at any time.
>E.g., *AFAIK*, MS can, *at any time*, request that we stop running win95
>and erase it from our HDs, and whoever doesn't comply is a felon.
Copyright law only gives the copyright holder the exclusive right to
make copies (or authorize others to make copies on their behalf.) It
does not give the copyright holder the right to make additional
demands once the item is sold. If you want to create (for example) a
piece of artwork, and then make 10 copies, there is no way to force
you to create additional ones. And no one can make additional copies
just because you will not. You also could not require that the buyer
only display the item in a certain lighting, nor could you contact the
buyer and insist that they take the item off of their wall. ("No! No!
No! That was my 'orange and purple' phase. It was hopelessly
derivative. You must not make a mockery of my talents by displaying
that horrible mistake.")
Now if someone gives you a license to use their copy, they can create
additional restrictions. But those restrictions must be stated in the
licensing contract ahead of time. But there is even a limitation on
what you can do with licensing. You probably can not create a word
processor, license it to someone, with the stipulation that they only
write happy stories. That is why the Free Software Foundations General
Public License has its restrictions on how the software is
distributed, not on how it is used. They couldn't say that when you
compiled the binary that you could not delete the source, they only
said that you could not distribute the binary unless you distributed
the source (or one of the alternate options.)
If you agree to a license, and especially if you run a business
depending on a license, in which the licensor states that you must stop
using it on demand. Thats your own problem.
Luckily, I just checked the licensing agreement that came with my copy
of Windows 95. It doesn't seem to have any clause that states that
the licensee there is any sort of time limitation on the
software. Neither does it say that a licensee may have to stop using
the software for any reason.
If what you wrote was in fact "As Far As I Know," it isn't very far.
--
Andrew Langmead
------------------------------
Date: Sat, 25 Apr 1998 07:53:32 GMT
From: Russell Senior <seniorr@teleport.com>
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <86k98e1gna.fsf@coulee.tdb.com>
>>>>> "Martin" == heller <heller@nacs.net> writes:
Martin> BTW, go to www.gnu.org to see a definition of their
Martin> concept. They no longer use "free", rather it's now "open
Martin> source".
Incorrect. The FSF still calls it `free software'. For a discussion,
see:
<http://www.gnu.org/philosophy/open-source-or-free.html>
I particularly like the section titled: `Fear of Freedom'
--
Russell Senior
seniorr@teleport.com
------------------------------
Date: Sat, 25 Apr 1998 14:59:32 +0100
From: Ben Bullock <ben@hayamasa.demon.co.uk>
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <3541EC44.2E32FE91@hayamasa.demon.co.uk>
heller@nacs.net wrote:
> BTW, go to www.gnu.org to see a definition of their concept. They no
> longer use "free", rather it's now "open source".
In fact they don't use ``open source'' but ``free''. See
the page
http://www.gnu.org/philosophy/open-source-or-free.html
for the reasoning.
For the case for open source, the address is
http://www.open-source.org/
--
Ben Bullock
------------------------------
Date: 25 Apr 1998 14:24:11 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: scalar assignment
Message-Id: <6hsrmb$m3k$1@lyra.csx.cam.ac.uk>
In article <ujU88#vb9GA.152@upnetnews03>, tw96 <tw96@email.msn.com> wrote:
>hello, everybody!
>i tried, but still don't know how to correct these two errors, please
>help!!!
>
>error1 on one program:
>line 3: syntax error near unexpected token
>`open(FILE,"</client/home/webcmo/docs/report.html")'
That doesn't look like a current Perl error message.
Do I smell Perl 4?
Mike Guy
------------------------------
Date: Fri, 24 Apr 1998 20:02:17 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Sendmail library
Message-Id: <353ffd62.7346877@news.btinternet.com>
On 23 Apr 1998 22:06:02 GMT, "dan" <dan.albertsson@swipnet.se> wrote:
>-Is there a sendmail library out there to be used with perl to more easily
>use sendmail from inside perl?
There is the Mail:: stuff available from CPAN which will do away with
sendmail etc.
>-If not, how can I use sendmail or any other mail program to append a file
>to my mail?
Read the docs for your program.
>-Is there a problem with 7-bit vs 8-bit coding?
There are modules that do the right thing vis MIME.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sat, 25 Apr 1998 05:59:58 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: skipping ahead in a foreach loop
Message-Id: <EryGnz.6L1@world.std.com>
empires@ivillage.com writes:
>Is there a way, in the context of a foreach loop, to skip ahead an arbitrary
>number of elements? For example, if I hit one element of a list, and from
>its content decide that I want to skip the next two, is there a way to do
>this? It's easy enough to do when using file input as the list, like:
> foreach (<FILE>)
The foreach loop doesn't work like that either. Since the foreach loop
gives a list context to the readline operator, it gets the rest of the
lines of the filehandle FILE before the loop begins, and then iterates
on each line. You are probably thinking of:
while(<FILE>)
which gives a scalar context to the readline operator, reading one
line for each loop iteration, exiting the loop once the filehandle
returns end of file. And because a lone filehandle read inside a while
loop is magical, it assigns it to the $_ variable in each iteration.
(This was leading to the suggestion of "while($_ = shift @array)", but
then when I got here, I realized that the loop would exit on any
boolean false value. Now that I think of it, I suggested that in 1993
and I think it was Tom Christiansen who pointed out my error.)
Have you thought about shifting off elements of the array inside the
loop?
while(@array) {
$var = shift @array;
}
or about using a numerically indexed array?
for($elem = 0; $elem < @array, $elem++)
(but I wouldn't recommend that one. Altering the index inside the loop
is poor coding practice.)
or about having a variable which you could use to index into the array
and comparing it against the size of the array?
$elem = 0;
while($elem < @array) {
# loop body goes here
$elem++;
}
The while/shift is fine if you don't care about the array after the
loop is over. The other while keeps the loop intact.
--
Andrew Langmead
------------------------------
Date: 25 Apr 1998 14:09:35 GMT
From: "Arun Gurjale" <gurjale.arun@worldnet.att.net>
Subject: System call in Perl not working
Message-Id: <6hsqqv$5lo@bgtnsc02.worldnet.att.net>
Here is a the problem:
We are trying to remove zero length files that is created by Groupwise 4.1a
running on a Solaris 2.5.1 platform. From the command line the following
command works like a charm:
find /po/gwmail -size 0c -exec rm {} \;
We had to put this in a cron job that runs every half hour and we did this
in Perl. The Perl script has many other things in it and we added the
following line to the script:
$err_msg = system("find /po/gwmail -size 0c -exec rm {}\;");
The script complains that the "find command is incomplete". We cannot in
the world figure out what is wrong. There is something there that Perl
does not like.
Anyone out there please help.
Arun and Max.
------------------------------
Date: 25 Apr 1998 14:23:59 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: System call in Perl not working
Message-Id: <6hsrlv$7fm$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"Arun Gurjale" <gurjale.arun@worldnet.att.net> writes:
: $err_msg = system("find /po/gwmail -size 0c -exec rm {}\;");
That's not a system call. It's not in section 2, and it isn't just
a tiny wrapper for a trap into kernel space. *These* are system calls:
SYS_setup SYS_exit SYS_fork SYS_read SYS_write SYS_open SYS_close
SYS_waitpid SYS_creat SYS_link SYS_unlink SYS_execve SYS_chdir
SYS_time SYS_prev_mknod SYS_chmod SYS_chown SYS_break SYS_oldstat
SYS_lseek SYS_getpid SYS_mount SYS_umount SYS_setuid SYS_getuid
SYS_stime SYS_ptrace SYS_alarm SYS_oldfstat SYS_pause SYS_utime
SYS_stty SYS_gtty SYS_access SYS_nice SYS_ftime SYS_sync SYS_kill
SYS_rename SYS_mkdir SYS_rmdir SYS_dup SYS_pipe SYS_times SYS_prof
SYS_brk SYS_setgid SYS_getgid SYS_signal SYS_geteuid SYS_getegid
SYS_acct SYS_phys SYS_lock SYS_ioctl SYS_fcntl SYS_mpx SYS_setpgid
SYS_ulimit SYS_oldolduname SYS_umask SYS_chroot SYS_prev_ustat
SYS_dup2 SYS_getppid SYS_getpgrp SYS_setsid SYS_sigaction
SYS_siggetmask SYS_sigsetmask SYS_setreuid SYS_setregid SYS_sigsuspend
SYS_sigpending SYS_sethostname SYS_setrlimit SYS_getrlimit
SYS_getrusage SYS_gettimeofday SYS_settimeofday SYS_getgroups
SYS_setgroups SYS_select SYS_symlink SYS_oldlstat SYS_readlink
SYS_uselib SYS_swapon SYS_reboot SYS_readdir SYS_mmap SYS_munmap
SYS_truncate SYS_ftruncate SYS_fchmod SYS_fchown SYS_getpriority
SYS_setpriority SYS_profil SYS_statfs SYS_fstatfs SYS_ioperm
SYS_socketcall SYS_klog SYS_setitimer SYS_getitimer SYS_prev_stat
SYS_prev_lstat SYS_prev_fstat SYS_olduname SYS_iopl SYS_vhangup
SYS_idle SYS_vm86 SYS_wait4 SYS_swapoff SYS_sysinfo SYS_ipc SYS_fsync
SYS_sigreturn SYS_clone SYS_setdomainname SYS_uname SYS_modify_ldt
SYS_adjtimex SYS_mprotect SYS_sigprocmask SYS_create_module
SYS_init_module SYS_delete_module SYS_get_kernel_syms SYS_quotactl
SYS_getpgid SYS_fchdir SYS_bdflush SYS_sysfs SYS_personality
SYS_afs_syscall SYS_setfsuid SYS_setfsgid SYS__llseek SYS_getdents
SYS__newselect SYS_flock SYS_syscall_flock SYS_msync SYS_readv
SYS_syscall_readv SYS_writev SYS_syscall_writev SYS_getsid SYS_mlock
SYS_munlock SYS_mlockall SYS_munlockall
It's time to dig out your architecture manual if you start calling
user-mode functions `system calls'.
As for the rest of your question, the precise behaviour of the function
named system() [WHICH IS NOT A SYSTEM CALL] is explained in the
perlfunc(1). Furthermore, your drastic confusion about that function
[WHICH IS STILL NOT A SYSTEM CALL] is well documented in section 8 of
the Perl Frequently Asked Questions list. In short, you already have
the answer to your question, but you forgot to look.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Since nobody ever compared Hitler to Hitler, being compared with Hitler
immediately disqualifies you for Hitlerhood."
--Larry Wall
------------------------------
Date: 25 Apr 1998 15:25:41 +0100
From: Bruce Stephens <bruce@cenderis.demon.co.uk>
Subject: Re: System call in Perl not working
Message-Id: <m33ef26kre.fsf@cenderis.demon.co.uk>
"Arun Gurjale" <gurjale.arun@worldnet.att.net> writes:
> $err_msg = system("find /po/gwmail -size 0c -exec rm {}\;");
> The script complains that the "find command is incomplete". We cannot in
> the world figure out what is wrong. There is something there that Perl
> does not like.
You probably need more quoting for the ";". Perl will swipe the
single "\", and probably system will call a shell, so the find command
never gets to see the ";".
------------------------------
Date: Sat, 25 Apr 1998 06:12:05 -0600
From: chiumh@ms15.hinet.net
Subject: Re: WebMail Server ?
Message-Id: <6hsge5$aph$1@nnrp1.dejanews.com>
In article <35403E21.167EB0E7@spam.me>,
terry <dont@spam.me> wrote:
>
>
> http://www.endymion.com/portfolio/software/scripts/mailman.htm
>
> Terry Lambert
> ---
> Any opinions in this posting are my own and not those of my present
> or previous employers.
>
Among messages within the thread, this is
one really valuable to persons asking or
sharing the same question.
Regards
MHC
-----== 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 2417
**************************************