[8067] in Perl-Users-Digest
Perl-Users Digest, Issue: 1687 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 20 20:17:26 1998
Date: Tue, 20 Jan 98 17:00:21 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 20 Jan 1998 Volume: 8 Number: 1687
Today's topics:
A 'Two Byte Integer' Problem <vchandra@mail.delcoelect.com>
CLS in Perl??? <david.mohorn@norfolkva.ncr.com>
Re: CLS in Perl??? (brian d foy)
Re: converting string to function reference <abraham@mail.mpi.com>
Directory Listing... <abb37@dial.pipex.com>
Embedded variable names in text files....possible? <dawfun@seanet.com>
Re: FAQ too big (Was: Re: PERL forking) (brian d foy)
Re: grabbing email adresses from webpages (Frank)
Re: Hashes w/ case-insensitive keys (brian d foy)
help with sorting <msda+@andrew.cmu.edu>
Help with SWIG and Perl (Mark Denby)
Re: I need a man to lick me in to a frenzy!!! <rpsavage@ozemail.com.au>
Re: Logical 'and' in regex? <*@qz.to>
Modifying \n\r on a directory tree of html files to \n (Brian Lavender)
mymy revisited <yary@apicom.com>
Perl 5 and ORACLE 7 on Windows 95 <mzelmanov@qquest.com>
Re: Perl problem with IE3 <a@b.c.d>
Perl-5 for NT invoking another script <david.mohorn@norfolkva.ncr.com>
Problems with DBFile (Jonathan Nicholson)
Re: REGEXP: Does it need optimization? <*@qz.to>
Re: Simple example of Select needed please (Nicholas J. Leon)
Re: source into binary code (John Stanley)
Re: space searching? (Nicholas J. Leon)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 20 Jan 1998 17:58:30 -0500
From: "V. Chandrasekhar" <vchandra@mail.delcoelect.com>
Subject: A 'Two Byte Integer' Problem
Message-Id: <34C52C16.264D@mail.delcoelect.com>
1. In an earlier posting today, I had asked a question.
The question in present posting is a key part of the
previous one. Unfortunately, it may not stand out
clearly, as it was written; hence the separate posting.
2. I want to store numbers guaranteed to be in the
-32768 to 32767 range, as a 16 bit hex number
(i.e., Hex 8000 to 7FFF)
3. I think that the following will work. I am not 100%
sure and would like to get a 'critique'.
Assuming that $number contains the number and that it is
in the expected range,
if ($number < 0) {
$flag = 1;
}
$string1 = sprintf("%4x", $number);
if ($flag) {
$string = substr($string1,4,4) ;
}
else {
$string = $string1;
}
$string =~ tr/abcdef/ABCDEF/ ;
exit;
4. Thanks.
------------------------------
Date: Tue, 20 Jan 1998 18:15:34 -0500
From: "Daivd Mohorn" <david.mohorn@norfolkva.ncr.com>
Subject: CLS in Perl???
Message-Id: <01bd25f9$92fa3f00$695c5499@DCWASH3259.washingtondc.ncr.com>
Does Perl-5 have a Clear Screen function or the like? I'm trying to
display a menu and have to use a bunch of linefeeds to clear screen right
now....
-
+-----------------------------------------------------+
| david.mohorn@norfolkva.ncr.com |
+-----------------------------------------------------+
------------------------------
Date: Tue, 20 Jan 1998 18:57:57 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: CLS in Perl???
Message-Id: <comdog-ya02408000R2001981857570001@news.panix.com>
Keywords: from just another new york perl hacker
In article <01bd25f9$92fa3f00$695c5499@DCWASH3259.washingtondc.ncr.com>, "Daivd Mohorn" <david.mohorn@norfolkva.ncr.com> posted:
>Does Perl-5 have a Clear Screen function or the like?
perhaps you want to play with curses.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
------------------------------
Date: Tue, 20 Jan 1998 17:51:52 -0500
From: Jim Abraham <abraham@mail.mpi.com>
To: Alex Khesin <khesin@staff.juno.com>
Subject: Re: converting string to function reference
Message-Id: <34C52A88.9551A9FB@mail.mpi.com>
try something like this:
my $x = "foo";
&{$x}; # or &{foo}
sub foo {
print "Perl's cool!";
}
jim abraham
Alex Khesin wrote:
> I cannot figure out the syntax to do the following:
>
> I have a string variable with function name in it, and I need to create a
> variable containing a reference to this function, i.e.
>
> sub foo {}
>
> $a = "foo";
> ... some magic to make $aref refer to whatever $a names (&foo in this
> example)
> &$aref;
>
> (To give some context, I am trying to build a function dispatch table which
> I want to be able to initialize from a text file)
>
> Please help!
>
> Alex
------------------------------
Date: 21 Jan 1998 00:12:41 GMT
From: "David Reid" <abb37@dial.pipex.com>
Subject: Directory Listing...
Message-Id: <01bd2601$49079b60$59f682c1@gateway>
Hi. I need to capture a directory listing so I can mess with the files
(move them after sorting and cataloguing them) and would like to do it with
a perl script. So I can do all the sorting bits, but whats the best way of
getting a directory listing. Ideally I'd like to build an array with every
file in the directory, but thats the bit I can't do.
Its an NT 4 server, with Perl 5.004. One thought I'd had was to use the
'DIR' command from a system command, then capture the output, but is that a
stupid way of doing it??
Any help, as always, gratefully recieved.
(Spelling mistakes deliberate)
david reid
------------------------------
Date: Tue, 20 Jan 1998 15:31:52 -0800
From: Jonathan Cunningham <dawfun@seanet.com>
Subject: Embedded variable names in text files....possible?
Message-Id: <34C533E7.A473D2CD@seanet.com>
Hi,
I'm kind of stuck on this one....
I have a file called 'contact1.txt', and I want to open it and print the
contents to the screen. Within the text of this file I have what I
hoped would have been a variable name '$emailaddress', however upon
opening and printing this file, instead of printing the contents of
'$emailaddress' it instead prints "$emailaddress". See example:
### contents of contact.txt ###
This is my email address: $emailaddress.
### contents of my code ###
open(CONTACT1, "<contact1.txt") or die "contact1.txt not found";
$emailaddress = 'my@address.com';
while(<CONTACT1>) {
$contact1 = "$contact1<br> $_";
}
close(CONTACT1);
print $contact1;
### actual result ###
This is my email address: $emailaddress.
### intended result ###
This is my email address: my@address.com.
### end example ###
Any help would be greatly appreciated. I'm really stuck here.
Thanks in advance,
Jonathan
dawfun@seanet.com
------------------------------
Date: Tue, 20 Jan 1998 18:36:15 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: FAQ too big (Was: Re: PERL forking)
Message-Id: <comdog-ya02408000R2001981836150001@news.panix.com>
Keywords: from just another new york perl hacker
In article <01bd25e8$5f0a68c0$a041f9a5@dyyfc1.aca.arcochem.com>, "Kevin Hawley" <cchkxh@ARCO.com> posted:
>I don't have 40 years to read the FAQ.
that's why it's divided into sections which may be further subdivided.
you only need to read the parts relevant to your particular problem.
if you never start to learn to find information on your own, you
will always be dependent on others for answers.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
------------------------------
Date: Tue, 20 Jan 1998 23:17:44 GMT
From: FHeasley@chemistry.com (Frank)
Subject: Re: grabbing email adresses from webpages
Message-Id: <34c63065.28558671@news.halcyon.com>
On 20 Jan 1998 22:34:38 GMT, mgjv@comdyn.com.au (Martien Verbruggen)
wrote:
>In article <34C51730.ABBB7B9B@rice.edu>,
> Pascal Hos <paashaas@rice.edu> writes:
>
>> spider search and a webpage containing url's is displayed. How could one
>> obtain all the email addresses without actually opening the url's
>> themselves
>
>Look for a mailto: link. Ask your psychic.
>
Since he doesn't want to open the URL, I think option #2 is probably
the most likely to yield results.
Frank
------------------------------
Date: Tue, 20 Jan 1998 18:01:45 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Hashes w/ case-insensitive keys
Message-Id: <comdog-ya02408000R2001981801450001@news.panix.com>
Keywords: from just another new york perl hacker
In article <uqHuvPfJ9GA.309@nih2naac.prod2.compuserve.com>, "Donnie Hale" <dhale@web.compuserve.com> posted:
>Is there any easy way to work w/ hashes using case-insensitive keys. More
>specifically, I call a function that fills in a hash. I expect certain keys
>to be there. However, if the case doesn't match exactly, the key is, in
>essence, not found.
convert all your keys to a common format (i.e. the result of lc(), for
instance).
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
------------------------------
Date: Tue, 20 Jan 1998 18:53:33 -0500
From: Michael D Sohn <msda+@andrew.cmu.edu>
Subject: help with sorting
Message-Id: <0olHXx200YUf01xrs0@andrew.cmu.edu>
I have a table of information that is delineated by tabs that I want to
sort. The problem is that the column that I want to sort on is in
scientific notation. For example:
@data =
19 [tab] 39.27e-07 [tab] 7.19
31 [tab] 49.27e-07 [tab] 37.19
41 [tab] 69.27e-07 [tab] 47.19
21 [tab] 49.27e-07 [tab] 57.19
52 [tab] 51.97e-06 [tab] 512.05
82 [tab] 21.97e-06 [tab] 142.05
42 [tab] 71.97e-06 [tab] 152.05
32 [tab] 971.97e-06 [tab] 152.05
I'm not familier with Perl enough to know how to do this. I would like
to sort on the second column and maintain the order of the information
in the same row. I would think this is a basic problem. Any
suggestions on doing this?
thanks,
Mike
------------------------------
Date: Tue, 20 Jan 1998 23:54:07 GMT
From: mark@mymail.co.uk (Mark Denby)
Subject: Help with SWIG and Perl
Message-Id: <885340540.21963.1.nnrp-09.9e98ff74@news.demon.co.uk>
Hi,
I am currently trying to use SWIG(1.1p4) to interface Perl(5.004_04)
to a C function.
The Perl function would ideally take a single scalar argument and
return a single scalar, for example:
$i = "Hello world!";
$j = &mylib::myfunc($i);
print "Return is $j\n";
I now have this working fine. The problems start when I want to pass
and/or return a scalar which contains '\0'.
For passing into the C function I can do this by:
$i = "Hello\0world!";
$j = &mylib::myfunc($i,length($i));
and modifying the C prototype to take a length parameter:
char *myfunc(char *) becomes char *myfunc(char *,int)
My questions are now:
1) If I need to malloc in my C to allocate the return string,
should I be using typemappings in the SWIG interface file to
free the memory? (Seems to work fine)
2) Is it necessary to pass the length parameter from Perl, or can
this be also be achieved by using typemappings? ie. from C, can I
get at the length of the non-NULL terminated Perl string.
3) How do I return a non-NULL terminated, newly malloced string to
Perl? I reckon I could do it by rewritting in C++ and creating
some form of String object which contains a void * and an int,
but it seems a bit of a long way round (although I guess you'd
have to do the equivalent in C...hmmm....).
4) Would using XS instead help any of this?
I'd be most grateful if anyone could shed any light on this for
me.
Many thanks in advance,
Mark.
------------------------------
Date: Wed, 21 Jan 1998 09:35:34 +1000
From: Ron Savage <rpsavage@ozemail.com.au>
Subject: Re: I need a man to lick me in to a frenzy!!!
Message-Id: <34C534C6.53F4@ozemail.com.au>
<OFFTOPIC>
[snip]
Nice try, guys. But I suspect the original post was a pathetic attempt to quote this song:
Travelling New Used Jews Dues Blues, by Pete Brown and His Battered Ornaments (I kid you not),
which contained this verse:
When I get home baby baby you can peel me a grape
When I get home baby baby I said you can peel me just 1 grape
Then you can bend over me real low and lick me into shape.
And, yes, in Australia, Travelling really does have 2 l's, whereas in North America, you've never really
sure...
</OFFTOPIC>
--
Cheers,
Ron Savage
Office: savage.ron.rs@bhp.com.au
Home (preferred): rpsavage@ozemail.com.au
------------------------------
Date: 20 Jan 1998 23:03:48 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Logical 'and' in regex?
Message-Id: <qz$9801201754@qz.little-neck.ny.us>
Kingpin <mthurn@irnet.rest.tasc.com> wrote:
> Vladimir Alexiev <vladimir@cs.ualberta.ca> writes:
> > >perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
> > Can someone confirm that and explain why a version with no ? in the
> > indicated position takes more user, but less system time?
> Run, do not walk, to your nearest bookstore and buy and read
> "Mastering Regular Expressions" by Jeffrey Friedl, ISBN 1-56592-257-3.
Yeah that is a good book, but this requires both an understanding of
regular expressions and math. (Plus it helps to pay attention to
the version of perl being used.) See also my post in another thread
about this and go to Dejanews for the extensive discussion that
happened here in (probably) November.
Elijah
------
has never seen the hip owls book in a bookstore
------------------------------
Date: Tue, 20 Jan 1998 17:51:21 -0600
From: brian@brie.com (Brian Lavender)
Subject: Modifying \n\r on a directory tree of html files to \n files for UNIX
Message-Id: <885339875.1359347716@dejanews.com>
I am trying to figure out how to change an entire directory of html files
which have the \r\n line termination to the unix style with just a \n. I
looked at dejanews and I found this simple one line by Mr. McClellan to
change a single file named joe.pl.
On1997/04/27 tadmc@flash.net (Tad McClellan) wrote:
You can do that with a perl one-liner too:
perl -pi.bak -e 's/\r//' joe.pl
(joe.pl.bak will hold the original (DOS) contents)
How can I make this so it traverses down a directory tree and modifies
all .html files? I could not find a recursive switch in the Camel book.
It seems that having the -i.bak switch is a good idea, but how would I
get rid of the .bak files once I determine the perl command routine was a
success?
Brian
I apologize if this is double posted. Problems w/ ISP's news server.
--------------------
Brian Lavender
Sacramento, CA
http://www.brie.com/brian/
"For best results, squeeze from the bottom and flatten as you go up."
-- Colgate Toothpaste Tube
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Tue, 20 Jan 1998 15:07:45 -0800
From: Yary <yary@apicom.com>
Subject: mymy revisited
Message-Id: <34C52E41.3C2A@apicom.com>
Hi. I posted a question similar to this last week, but from a very
slow news server, and it wasn't very clear. So I'm trying again.
What I really want to do is have a subroutine that works either on
two hashes or two arrays. I know I can do
mything \(@a, @b);
mything \(%a, %b);
and inside mything I can check what's getting passed in and
carp as needed.
But perl does have prototypes:
sub mything_array (\@\@) { ....
sub mything_hash (\%\%) { ....
can be called as
mything_array @a, @b;
mything_hash %a, %b;
and the subs get references to the arguments.
Now, I suppose this is impossible, but is there some prototype, or some
other hack, to have
my_uberthing @a, @b;
my_uberthing %a, %b;
call "my_uberthing" with references to the two arguments?
And, restating my original more general question, is it possible to
create a
sub mymy ....
such that calling
mymy @a, %b, FILEHANDLE_C, $d, *e ....
gives mymy references to all those arguments?
------------------------------
Date: 20 Jan 1998 23:07:33 GMT
From: "Mikhail Zelmanov" <mzelmanov@qquest.com>
Subject: Perl 5 and ORACLE 7 on Windows 95
Message-Id: <01bd25f7$309bab20$1a2bcbd0@mzelmanov.qquest.com>
Hi.
I installed Perl5.004_02 on WIN95 which included DBI-0.89.
Then I installed DBI_0.90 and DBD_0.47.
I am trying to connect Perl5 to ORACLE 7 from WIN 95.
When I compile a test program I get this massage.
C:\perl\test>perl test.pl
DBI object version 0.89 does not match $DBI::VERSION 0.90 at
C:\PERL\lib/DynaLoader.pm line 172.
BEGIN failed--compilation aborted at test.pl line 5.
How can I fix this problem?
Thanks .
mailto:MZELMANOV@qquest.com
------------------------------
Date: 20 Jan 1998 19:37:07 -0500
From: Myles Barrett Williams <a@b.c.d>
Subject: Re: Perl problem with IE3
Message-Id: <lc90saaci4.fsf@duncan.cs.utk.edu>
"Vince" <vince@vrm.co.uk> writes:
> Can you help please? I've a Perl script that accepts search data from a
> page, this data is used to search some flat files that are delimited by "|"
> and returns the found items in a web page.
>
> This script works fine in NS3, NS4 and IE4, but in IE3 it does not finish
> creating the page, always at the same point it stops. Is there a problem
> with IE3?
Maybe.
(Did you really expect a more detailed answer?)
------------------------------
Date: Tue, 20 Jan 1998 18:17:16 -0500
From: "Daivd Mohorn" <david.mohorn@norfolkva.ncr.com>
Subject: Perl-5 for NT invoking another script
Message-Id: <01bd25f9$cfcdd720$695c5499@DCWASH3259.washingtondc.ncr.com>
How can I have a Perl script invoke another perl script under Windows
95/NT? I am currently using a batch file, something like:
perl Hello1.pl
perl Hello2.pl
But would like to call Hello2.pl from within Hello1.pl. Any help would be
appreciated.
--
+-----------------------------------------------------+
| david.mohorn@norfolkva.ncr.com |
+-----------------------------------------------------+
------------------------------
Date: 20 Jan 1998 22:53:40 -0000
From: jono@nospam.nowhere.noorg (Jonathan Nicholson)
Subject: Problems with DBFile
Message-Id: <6a39tk$jk0$1@acme.demon.co.uk>
Hi, I've got a fairly major application that is written in perl and relies
heavily on the Berkley DB interface.
I'm using the DB_Hash method to read/write from disk. The code has been
very reliable in my testing of the code, but since it has gone into a
production system the database has become corrupted quite frequently, with
elements either not being saved correctly or elements not being updated
correctly.
This is causing some problems! The database is so critical to the
application that I've been keeping fragmented backups so I can recreate
the whole thing, it's just tedious and not something that you want to have
to do every day (about how often the corruptions are happening).
The database is accessed across NFS, at this time NFS locking isn't
implemented due to unrelated problems, the same corruptions have been
experienced when NFS locks are in place.
I'm opening the database with the line:-
$outputdb = tie(%datatie, "DB_File", $MASTER_DB, O_RDWR|O_CREAT, 0640,
$DB_HASH) || die "Failed to open file $MASTER_DB for write : $!\n";
and writing values back with
$datatie{$instance} = $newdata; # Write the data out.
$outputdb->sync(); # Sync the database.
Where $newdata is a packed data set which is approximately 2Kb big.
One of the serious weirdnesses that I have encountered with the DBfile is
as follows:-
The key for the hash is a project code which has the format:-
dJ149A1631
this code isn't acceptable for some reason, how ever another one:-
dJ172B2031
is fine!
If I attempt to make an entry in the database with the first key
(dJ149A1631) it will not work, but I can create an entry with the key
(dJ149A1631.) fine.
I find this very very bizzare!
Any help would be greatly appreciated, please can you reply to me by email
as well as to the newsgroup! (Address is below in anti spam format)
Regards,
Jonathan
--
| Jonathan Nicholson (jono at acme dot demon dot co dot uk) 0973 199 983 |
| The great thing about television is that if anything happens, anywhere |
| in the world, night or day, you can always change the channel |
------------------------------
Date: 20 Jan 1998 22:55:35 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: REGEXP: Does it need optimization?
Message-Id: <qz$9801201702@qz.little-neck.ny.us>
Greg Bacon <gbacon@adtran.com> wrote:
> Vladimir Alexiev <vladimir@cs.ualberta.ca> writes:
> : Care to explain this? I just found out that in the following perversion:
> : perl -le 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
> : removing the cautious quantifier here ^ causes it
> : to take 6x more user time, but 2.5 times less system time.
There was some discussion here of that RE a month or three ago.
Dejanews should have it. Abigail's first version was
perl -le 'print "Prime" if (1 x shift) =~ /^(?!(11+)\1+$)/'
Which is much different. The analysis of efficiency resulted in
the change. In my crude tests I found that for the old version
perl5.002 had much the same results for 10007 (prime) verus 10609
(square of a prime), while perl5.004 took roughly twice as long
for the non-prime. On the new version of the test the prime numbers
took about the same time, but the non-primes were much faster with
both versions of perl.
> Keep in mind that /.+/ and /.+?/ are not necessarily equivalent. I
> found jfriedl's diagrams at the Perl Conference most enlightening.
They are indeed not. For this case ("^(11+?)\1+$" vs "^(11+)\1+$")
the minimal match finds the smallest factor of a non-prime, while
the maximal finds the largest. (Okay, the smallest and the largest
multiple together to produce the number, I mean that the parens are
grabbing the smallest vs the largest in the two cases.)
> My guess is, with Abigail's primality test, the regex engine has to
> do much more backtracking with the greedy version, but the cautious
> version is an optimization for finding the critical point toward the
> front or in the middle of the run of 1s instead of near the end.
> Maybe Jeffrey or Elijah can offer a better explanation.
With the greedy one the RE engine goes to the end and then works it's
way back to a factor. It has to go at least half way to find one. With
the non-greedy one it can find a factor very quickly if there is one.
Elijah
------
hasn't mucked around with the internals of the perl RE engine
------------------------------
Date: Tue, 20 Jan 1998 18:29:51 -0500
From: nicholas@binary9.net (Nicholas J. Leon)
Subject: Re: Simple example of Select needed please
Message-Id: <MPG.f2efd7c4ddf2666989681@client.news.psi.net>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
In article <34C5039B.5A052F64@houston.Geco-Prakla.slb.com>,
barnett@houston.Geco-Prakla.slb.com says...
> Paul Ryder wrote:
> >
> > Hi,
> >
> > Could someone just outline a simple example of how select works.
> select() allows you to set the "current default" file handle.
> select(STDOUT) selects STDOUT such that print "junk\n" will print junk
> followed by a newline to STDOUT. select(FILE) followed by print
> "junk\n" would print junk followed by a new line to the file referenced
> by filehandle "FILE".
Or are we talking about blocking until something is available on a
specific filehandle? If so, try looking into the IO::Select module. Very
easy to use.
------------------------------
Date: 21 Jan 1998 00:26:43 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: source into binary code
Message-Id: <6a3fc3$4u3$1@news.orst.edu>
In article <Pine.OSF.3.95.980120125356.31207S-100000@primal.ucdavis.edu>,
Jason Christian <jason@primal.ucdavis.edu> wrote:
>Out here in the real world, most of us cannot modify it ourselves,
>either because we lack the time or the skill. So we employ others to do
>it for us. The low cost improver of that software is probably the
>original author himself.
Right. Someone who lives in Oregon, for example, is going to come to
Florida, for example, for the type of wages that would be involved. No,
Florida will likely hire someone locally. The author still loses.
>> And you could be irrelevant. Whether or not they will succeed or make a
>> fortune is not the issue. That they not be prevented from trying is.
>> "You can't do that because you might fail" is a wonderful way to create
>> failure.
>
>You are building more straw men, I think.
The straw man is whether they will be successful or not. That one
belongs to you.
>I will *certainly* pay much less per hour of your
>time if you obfuscate your code (in whatever fashion).
You will either pay the licensing fee or not. You don't get to set the
price for my code. I do.
>On another of those tangents...your MRI software. I think it possibly
>unfortunate, and likely dangerous, for the medical profession to move
>away from the standards that have served it so well for so long: peer
>review.
Yep. Except I don't think the term "peer review" applies to the
software. The interpretation of the results perhaps, but not the
software itself.
>Now "you" (or whoever) can take some
>procedures out of that system...but it makes *me* nervous.
I really do wish you would read what is written. I am pointing out the
dangers of "free software" when applied to this application, not trying
to remove any procedures to make it happen.
>patents)...but I stillam *really concerned* about the inability to
>review exactly how a machine works.
There is a big difference between a knowledgable professional reviewing
how a machine works and giving the code to the users because it will be
"ethical" to let them debug and modify it themselves.
>No doubt. But hey, if you're running the company you can ignore
>everybody's brother's suggestions.
I see you have abadoned "the real world" you sought to bring into the
discussion earlier. No, if someone rings your telephone, you can't
ignore them. It may be someone who wants to buy your software. It may
be someone reporting a real bug. Every time someone calls up telling
you how to make your code better because they know the source and can
program, too, you lose time and money. And you can't just ignore calls
from everyone's brother because you have caller ID and know it is one
of them, they may be calling to order something. Every letter you get
has to be opened to make sure it isn't a purchase order. In the real
world, either YOU do it, and thus lose time from programming, or you
hire someone.
>As to Dr. Nursely fixing the
>software, this is another straw man.
It's doctors and nurses, not Dr. Nursely. But anyway, a benefit of
"free software" is that users can fix and modify the code. You can't
tell me the benefit is that and then say it isn't going to happen. If
it isn't going to happen, then there is no need to have "free
software".
>The hospitals, and medical profession
>in general, have long experience with coordinating review and
>improvement by a large and relatively open system of experts.
And a long experience of small experiments that lead to marvelous
discoveries. The doctor has the source. He thinks he knows how to fix
it. He tries. The hospital learns about it after the fact.
>Fine. I stand corrected. The rules for behavior within a corporate
>environment, and in the production of a standardized product, are likely
>to be different in many cases from those in an environment of
>professional-service agreements. That is all I am saying.
So what? What is your point?
>*I* am approaching the question from the buyers side, and
>explaining how *I* think a free-software, in the sense of readable and
>editable source code, benefits both buyers and sellers.
And I am trying to show you that this is not always the best thing.
>> >I do not believe that someone
>> >with training and talent in program ought to be restricted to being a
>> >Professional Software Engineer.
>>
>> This is from left field. Who said this?
>
>Why don't you deal with the whole paragraph?
I did. You left the whole paragraph, and my replies to it, in your
quote. Don't you look at what post before you post it?
I also asked you who said that someone with training and talent in
"program" ought to be restricted to PSE. If nobody is debating this, or
has said it, why are you arguing with ME about it? Aren't you the fellow
who just told me that I was arguing with you over somethign you had not
said?
> I am trying, with no
>evident success, to clarify my position, which is that
>training-expertise-and-talen in computer programming can be, and ought
>to be, useable either as an employee, within a corporate environment,
>perhaps even producing shrink-wrapped geegaws (you all have spoiled
>"widget" as the economist's standard term for an anonymous product),
>using whatever obfuscation schemes the corporation requires, or as an
>indepentent PSE, selling programming services to clients much like an
>attorney sells legal services to clients.
So I'll ask you again: who has said that this ought not to be the case?
If you feel you need to clarify your position, you must beleive that
someone else holds an opposing position. Who is it?
>> >Physicians and attorneys are often
>> >employed by businesses, or are entrepreneurs in their own businesses; so
>> >long as they do not claim to be "practicing medicine" or "practicing
>> >law," such activities are not unethical.
>>
>> Back the horses up, Ramone.
>>
>> Let me get this straight. You are saying that you think it is not
>> unethical for a doctor to run his own business, as long as he does not
>> claim he is practicing medicine? You are saying the same for lawyers?
>> By that claim, you imply that it IS unethical for a doctor to run his
>> own business (or work for someone else) and claim he is practicing
>> medicine. Ditto for lawyers.
>
>The corporate form that a medical or legal practice takes is not my
>concern. Kaiser is a medical practice, so was the single-physician
>practice that I visited as a child. Both are in the business of
>providing medical services to patients, and are bound by the physicians
>code of ethics.
And in both cases those doctors make the claim that they are practicing
medicine. You claimed it wasnt' unethical if they didn't make that
claim, which implies that it IS unethical if they do. Now explain that.
>Sometimes physicians go into the business
>selling...geegaws. Dr. Spademan, an orthopedist, invented and sold a
>fine ski binding. My dentist had a patent on a high-speed drill. Many
Much yammering about "human ethics" and doctors who open non-medical
businesses, deleted.
What's the point? So they can start another business. How is it
unethical?
>Free Software, in the sense of readible and editable source code, has
>the status of a proposed requirement for the code governing independent
>PSE's.
Now nice, a code that will get roundly ignored. Or not make it into the
final document.
>As a client of that profession, I support the requirement.
As someone closer to that profession, I do not. But once again we see
the propensity for people who support "free software" to push it on
those who do not. You support it, so you want it to be a requirement.
>> It is not unethical for a doctor to form a business to practice medicine
>> and announce that he is practicing medicine. Who he works for has no
>> bearing on the matter. As long as he is licensed in the state he is
>> working in, he can claim that he is practicing medicine whether he works
>> for WidgetCo as a staff doctor or for himself in his own office.
>>
>> Ditto for lawyers.
>
>That is true. If, on the other hand, he takes a job as a medical
>examiner for Adverse Selection Insurance, Inc., it *would* be unethical
>for him, after he has performed my medical exam for life insurance, to
>prescribe me some medicine.
Can you cite specific language from the Professional Doctor's Handbook
that says this? As long as he has a license to practice in the state he
practices in, he can prescribe medicines.
>What about a physician who formed a
>company for the manufacture of therapeutic geegaws? There things are
>tricky. If there is no substitute on the market, then it is hard to
>argue prescribing the product.
Hard to argue what about prescribing the product?
>If not...well, the good physician has
>placed himself in a conflict of interest, which is the sort of thing
>ethics codes are supposed to prevent.
So you are arguing that a doctor cannot create a company for the
production of anything that he might suggest a patient purchase? That is
the only way to prevent a conflict of interest.
>I hire a professional to help me through the intricacies of bits and
>bytes. If you are taking my dollars to fund the development of a
>geegaw...you have placed yourself in a conflict of interest.
Excuse me? So now ANYONE who takes money to write code is in a conflict
of interest? You are a hoot.
>I bought
>your time and your expertise, which you ought, under any reasonable code
>of professional ethics, to put to the best interests of your client,
>while you are serving him.
You paid for certain services. You do not own me. You do not own
everything I create, unless I agree to that before we start doing
business.
>Locking up the code, so that after you flip
>out to follow Rush Limbaugh on tour in a beat-up BMW van I cannot fix
>the bugs that appear, does not, in my book, count as looking after the
>best interests of the client.
And at the time I am following Rush, you are no longer paying for my
services. I am no longer required to look out for your best interests.
>If you want to be paid more for being a PSE...fine.
Oh, this is a dilly. You can now produce anything where I said I wanted
to be paid more for being a PSE? No? I didn't think so. A fine straw
man.
>I pay well for a good attorney, too. But the ethics of
>the geegaw manufacturer, while undoubtedly laudable, have little to do
>with "client-server protocols,"
I guess you don't understand what "client-server protocols" means, if
you beleive that just because you once paid me to write a program for
you we have one going on.
------------------------------
Date: Tue, 20 Jan 1998 18:26:16 -0500
From: nicholas@binary9.net (Nicholas J. Leon)
Subject: Re: space searching?
Message-Id: <MPG.f2efca2b5c790df989680@client.news.psi.net>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
In article <34c48b3e.8667800@194.72.35.45>, stephen@bcl.com says...
> Dear guys...
>
> I've got a desperate need to know how to do this so i'm begging for
> help..
>
> I have a line saying
> To: stephen@solamnia.demon.co.uk, stephen@bcl.com, daryn@blahblah.com
>
How 'bout
....
use Mail::Address;
my $test="stephen\@solamnia.demon.co.uk,
stephen\@bcl.com,daryn\@blahblah.com"
my @ar=Mail::Address->parse($test);
my $tmp;
for $tmp (@ar) {
print $tmp->address."\n" if $tmp->host eq 'bc1.com';
}
....
------------------------------
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 1687
**************************************