[7649] in Perl-Users-Digest
Perl-Users Digest, Issue: 1275 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 5 17:44:30 1997
Date: Wed, 5 Nov 97 14:00:27 -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 Wed, 5 Nov 1997 Volume: 8 Number: 1275
Today's topics:
'sort'ing umlauts <randy@hs1.hst.msu.edu>
Re: [Q] call a method not known until runtime (Toutatis)
binary file output (textual hex to binary stream - wmf <nick@bluewave.com>
Bug in 5.004_01 Solaris 2.5.1/SPARC fork() and EOF hand <niemi@tux.org>
Calling Perl from Web on VMS? <jjustice@cs.bsu.edu>
Chicago - Need an Ace Programmer <mvelasco@new2000.com>
Re: CPAN confusion (William R. Ward)
Re: help!: sfio compile problems, Solaris 2.6, gcc 2.7. (Stefan Reich)
importing ISAM data for Great Plains Dynamics software <fkadri@dynamex.ca>
Re: Is this possible? <james@mrs-blah.demon.co.uk>
Re: mkdir? (MODE is numeric not string) <jack_h_ostroff@groton.pfizer.com>
Newbie question (Chizl)
Re: Newbie question (Toutatis)
newbie seeks standardfile.pl for MacPerl (k w billerts)
Re: newbie seeks standardfile.pl for MacPerl (brian d foy)
Perl BINARY for VMS <scherer@gene.COM>
Perl CGI is haunted (Chizl)
Re: Perl CGI is haunted (brian d foy)
Re: Perl Format Command (William R. Ward)
Perl Programmer Wanted (Bill Goffe)
PERL->ADO->SQL <NoSPAMa-jackg@microsoft.com>
Re: Perl->Java? Java->Perl? Gaaaaa! (Richard Hoffbeck)
Protecting Perl Source <msuarez@cybernet.com>
Re: Protecting Perl Source (brian d foy)
Q: locking and re-writing file (Henry Gabryjelski)
Questions: pod2html indhiraa@hotmail.com
Sorting and Counting with PERL <mgalbreath@troweprice.com>
Re: Sys::Syslog not working on Linux <rijn@swi.psy.uva.nl>
talk and perl <mgrochal@vela.filg.uj.edu.pl>
Re: talk and perl (brian d foy)
trying to install fastcgi <kinlam@mec.cuny.edu>
Re: trying to install fastcgi (brian d foy)
where are deliverlib/audit.pl and deliverlib/mh.pl (Tom (John M. Klassa)
Re: why (and when) does undef == 0? <tkeitt@santafe.edu>
Re: Why no case statement in Perl? <prl2@lehigh.edu>
Re: Why no case statement in Perl? <bpatton@asic.sc.ti.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 5 Nov 1997 16:44:20 -0500
From: Randy Jay Yarger <randy@hs1.hst.msu.edu>
Subject: 'sort'ing umlauts
Message-Id: <Pine.NXT.3.95.971105161358.2611A-100000@hs1>
I'm trying to figure out a way to sort a list of names which contain some
characters with umlauts. The character with the umlaut should appear after
the corresponding character without. So with the list:
@words = qw#Food
Fudge
F(oe)o
#;
(To stick to 7-bit ascii I'll write umlaut-o as (oe).)
Plain sort @words gives:
Food
Fudge
F(oe)o
Putting (oe) after the regular characters.
I could also use:
sort { $a =~ tr/\366/o/; $b =~ tr/\366/o/; $a cmp $b } @words
Which would give
F(oe)o
Food
Fudge
Treating (oe) the same as 'o'.
But what I want is:
Food
F(oe)o
Fudge
Making (oe) the character right after o.
There has got to be a sort that does this, but I'm not sure where to
begin, anyone have any ideas?
(I though of turning the string into an array of the decimal character
values, remapping 246 (oe) to 111.5 (111 is 'o'), and then sorting
comparing the numerical values of the arrays. But maybe there is an easier
way?)
TIA,
Randy Jay Yarger | H-Net, Humanities OnLine
randy@yarger.tcimet.net | http://yarger.tcimet.net/
------------------------------
Date: 5 Nov 1997 17:13:35 GMT
From: toutatis@_SPAMTRAP_toutatis.net (Toutatis)
Subject: Re: [Q] call a method not known until runtime
Message-Id: <toutatis-ya023180000511971813380001@news.euro.net>
I wrote:
> Don't know. But I think:
> $obj->param() to get the value, and
> $obj->param('value') to set it
> is nicer, better managable and probably faster than AUTOLOAD.
That didn't make much sense, did it?
I ment:
$obj->param('name') to get the value, and
$obj->param('name',value) to set it.
--
Toutatis
------------------------------
Date: Wed, 05 Nov 1997 18:50:30 +0000
From: Nick Holmes <nick@bluewave.com>
Subject: binary file output (textual hex to binary stream - wmf image file)
Message-Id: <3460BFF6.366DB398@bluewave.com>
Hi
I am encountering some problems converting a textual hex file - embedded
in an rtf file into binary stream - the sort of thing you get in a gif
or other image file.
I have tried unpack and so-on, but that's still giving me text stuff,
and not the full binary rendition of the data.
any help on this would be great!
Nick Holmes
------------------------------
Date: Wed, 5 Nov 1997 16:10:30 -0500
From: David C Niemi <niemi@tux.org>
Subject: Bug in 5.004_01 Solaris 2.5.1/SPARC fork() and EOF handling?
Message-Id: <Pine.LNX.3.95.971105155826.15998B-100000@gwyn.tux.org>
I have a script that reads through a configuration file, forking off
children as it goes based on what it sees. The children do not muck with
the file descriptor for the configuration file at all, but do open files of
their own.
When the parent script gets to EOF of the configuration file, it does not
realize it has gotten there and starts reading fragmentary lines from
farther up in the file. Is this a known bug? Or is it illegal to have
open file descriptors when fork'ing? Immediately closing the configuration
file in the child processes does not help, but if I bypass the guts of the
child program the EOF is seen normally.
I have worked around the problem by reading the whole configuration file in
prior to forking any children, but wondered if this should be reported.
The key piece of the code:
open ('userconf', "$USERCONF") || die "Can't open $USERCONF: $!";
while (<userconf>) {
chop;
s/^\s*//; ## Eliminate leading whitespace
s/\s*$//; ## Eliminate trailing whitespace
s/^\#.*//; ## Eliminate comments
next if (/^$/); ## Skip blank lines and comments
unless (fork) { ## START CHILD PROCESS ##
#### child opens, flocks, and closes a number files
#### unrelated to $USERCONF, and makes a number of
#### calls to system()
exit 0; ## Exit from child process
} ## END CHILD PROCESS ##
sleep 5;
}
## Wait for children to finish
while (($cpid = wait) > -1) {
&debug("$0: Reaping child PID $cpid...\n");
}
David
Niemi@tux.org 703-810-5538 Reston, Virginia, USA
"Down that path lies madness. On the other hand, the road to
hell is paved with melting snowballs." -- Larry Wall, 1992
------------------------------
Date: Wed, 5 Nov 1997 15:43:02 -0500
From: "John Emmer" <jjustice@cs.bsu.edu>
Subject: Calling Perl from Web on VMS?
Message-Id: <63qle5$kp8@wizard.bsu.edu>
I have a Perl script that I would like to run on the VMS system here as
it needs access to some software that we only have installed on that system,
and not on the Unix servers. I know how to submit information to a cgi
script written in Perl and located on the Unix system, but I'm unfamiliar
with the ways of VMS and am quite clueless as to how this script needs to be
called.
I tried just putting the same script on the VMS system that I had on the
Unix system and just changing the url in my
<FORM ACTION="http://etc" METHOD="POST">
line, but I get an error 405:"The server does not implement the operation
you have requested"
What else do I need to change? I know that VMS uses a different file
structure, so I probably need to edit the first few lines of the script:
#!/usr/bin/perl
require 'cgi-lib.pl';
&ReadParse(*in);
What else do I need to know about? As you can see, I'm quite clueless here.
Any help or pointers to places to find help would be greatly appreciated!
Thanks!
--
John Emmer jjustice@cs.bsu.edu
Philosopher and Video Game Fanatic
Graduate Student : Ball State University : Computer Science
Graduate Assistant : University Computing Services
------------------------------
Date: Wed, 5 Nov 1997 14:25:20 -0600
From: "Michael J. Velasco" <mvelasco@new2000.com>
Subject: Chicago - Need an Ace Programmer
Message-Id: <63qkpb$116$1@hirame.wwa.com>
Startup business looking for an ace programmer. CGI, C++ a must. Has to be
very familiar with the Web, network hardware and with application
programming. Must be innovative, creative and solution-based. This company
wants to move
quickly. Respond to:
mvelasco@new2000.com
------------------------------
Date: 05 Nov 1997 13:24:44 -0800
From: hermit@cats.ucsc.edu (William R. Ward)
Subject: Re: CPAN confusion
Message-Id: <waa3elbniea.fsf@ese.UCSC.EDU>
comdog@computerdog.com (brian d foy) writes:
> In article <waan2jkyss9.fsf@am.UCSC.EDU>, hermit@cats.ucsc.edu (William R. Ward) wrote:
> >Maybe I'm just missing something here, but I find CPAN to be a total
> >pain in the ass to browse. If I access the module list I am unable to
> >find any documentation or detaile descriptions of the modules. It
> >seems to me that the package name should be a hyperlink to that
> >package's manpage. If I go to the author's page I can usually find
> >the docs I'm looking for but it's awkward to do it that way.
>
> PAUSE (Perl Authors Upload Server) automatically extracts the README
> file from distributions and makes a link to it in that module's directory
> (the filename ends in .readme).
>
> It's not really a problem with CPAN since it already has the functionlity
> you request. If module authors use README files, or put more helpful
> information in their README's (such as the SYNOPSIS of the POD), then you
> would have the information that you want.
I want to be able to see detailed information, not just the README.
Why ask authors to duplicate the POD contents in a README file when
the documentation itself could be made available?
> However, I disagree that detailed information, such as the entire
> manpage, should be made available on CPAN. One can simply download
> the module and run it through pod2man or another pod translator.
That's asking an awful lot to find out whether a module does what I
want. I think having all the POD online and web-accessible would be a
very good thing.
I think that CPAN is a good thing in general but I find that it is
awkward to use through the web (does anyone still use ftp clients
these days?) and could use some user interface improvements.
--Bill.
--
William R Ward Bay View Consulting http://www.bayview.com/~hermit/
hermit@bayview.com 1803 Mission St. #339 voicemail +1 408/479-4072
hermit@cats.ucsc.edu Santa Cruz CA 95060 USA pager +1 408/458-8862
------------------------------
Date: 5 Nov 1997 19:14:47 GMT
From: 1reich@informatik.uni-hamburg.de.fuck-spam (Stefan Reich)
Subject: Re: help!: sfio compile problems, Solaris 2.6, gcc 2.7.2.3
Message-Id: <63qgj7$b8b$1@heinz.home.de>
In <878416806.27234@dejanews.com> afc@c2o.com wrote:
> I'm trying to compile sfio on a fresh Solaris 2.6 machine using
> gcc 2.7.2.3 which has has already itself compiled and installed cleanly
> and compiled perl5.004 cleanly.
>
> I made the recommended changes to the sfio makefile in order to get
> iffe to use gcc and produce a decent FEATURE/sfio file. There was
> a patch to sfhdr.h posted here but it was rejected on my version (a
> recent download from AT&T Research) and it appears that the one-line
> change it wanted to make had already been done.
>
> Now, I get an error on the first file it tries to compile:
>
> gcc -c -I. -O sfclose.c In file included from sfhdr.h:275, from
> sfclose.c:1:
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.7.2.3/include/sys/mman.h:14
> 9: parse error before `off64_t' *** Error code 1
You need a symlink to gcc with the name "cc", since the sfio configuration
utility uses this hardcoded default name. After rerunning the script
everything should compile fine.
-------------------------------------------------------
Stefan Reich Tel: +49-40-85374422
Ruhrstr. 28 Fax: +49-40-85374443
22761 Hamburg 1reich(at)informatik.uni-hamburg.de
Germany (NeXTMail welcome)
------------------------------
Date: 5 Nov 1997 16:51:25 GMT
From: "Farouk Kadri" <fkadri@dynamex.ca>
Subject: importing ISAM data for Great Plains Dynamics software
Message-Id: <01bcea23$f3f4e880$efc6acce@farouk>
I have the accounting software Great Plains Dynamics and I want to know if
there is a mean to import data especially from ISAM files (Synergy
Database) to be used by Great Plains software
------------------------------
Date: 5 Nov 1997 17:07:46 GMT
From: "James Richardson" <james@mrs-blah.demon.co.uk>
Subject: Re: Is this possible?
Message-Id: <01bcea0d$69cdca20$26c0a4c1@kitkat.aethos.co.uk>
Kirk Herlitz <kherlitz@nortel.com> wrote in article
<345FC107.FE800C33@nortel.com>...
>
> Bottom line: Is it possible to have an associative array of lists?
>
Try
man perldsc
(The answer is yes!)
James
------------------------------
Date: Wed, 05 Nov 1997 14:01:50 -0800
From: "Jack H. Ostroff" <jack_h_ostroff@groton.pfizer.com>
Subject: Re: mkdir? (MODE is numeric not string)
Message-Id: <3460ECCE.371B@groton.pfizer.com>
Gabor wrote:
>
> In article <62j7a8$dkm$1@castor.dnai.com>, Tim Meals wrote:
snip...
> >At any rate, I'm having problems with getting mkdir to create a
> >directory. The O'Reilly book, CORE Perl documentation and FAQs (that
> >I've found) have very little about how to use mkdir correctly. I've
> >tried all of the following:
> >
> >mkdir($directory,"0776");
snip...
>
> Check to see what your umask is set to. It modifies the permissions.
>
> gabor.
> --
The blue camel says that the MODE arg of mkdir is NUMERIC (and is also
modified by the current umask).
------------------------------
Date: Wed, 05 Nov 1997 19:21:00 GMT
From: chizl@SPAMkarland.com (Chizl)
Subject: Newbie question
Message-Id: <3460c4d1.3739056@news.unicomp.net>
I'm not a Perl programmer and don't have a lot of time to learn, but
am in many other languages and understand what I'm looking at and can
modify most of the code.. I have a problem with a guestbook we setup
on our server.. Someone came in and put in as a comment <font size=7
color="#fffff"> which completly screwed everything below that up..
How do you look in that field for the char of <. I think if I could
get a If statement from someone I would be able to figuar out the
rest.. What confuses me about Perl is the
$form_data{$variable} =~ s/<([^>]|\n)*>//g;
So I figuar something like that is what I'm needing to do a search in
a field but then I really don't know..
$form_data{'comments'};
This would be thet info I need to work with..
Any help would be appreciated..
L8r,
Chizl - CEO
chizl@karland.com
http://www.karland.com/
http://www.sourcesite.simplenet.com
------------------------------
Date: 5 Nov 1997 20:49:09 GMT
From: toutatis@_SPAMTRAP_toutatis.net (Toutatis)
Subject: Re: Newbie question
Message-Id: <toutatis-ya023180000511972149100001@news.euro.net>
chizl@SPAMkarland.com wrote:
> I have a problem with a guestbook we setup
> on our server.. Someone came in and put in as a comment <font size=7
> color="#fffff"> which completly screwed everything below that up..
$form_data{'comments'} =~ s/</</g;
$form_data{'comments'} =~ s/>/>/g;
And let them put in all the tags they want.
Better put the essence of your question in the title. "Newbie question" is
not really descriptive, nor does anyone care... Generally, I skip messages
with titles like this. So much to read, and so little time, you know.
--
Toutatis
------------------------------
Date: 5 Nov 1997 19:25:06 GMT
From: kbillert@cyberenet.net (k w billerts)
Subject: newbie seeks standardfile.pl for MacPerl
Message-Id: <kbillert-ya023580000511971427210001@news.cyberenet.net>
I am new to the Perl environment and am using MacPerl. I would like to
develop some basic CGI scripts and obtained the following info from a
MacPerl FAQ:
2.3.1) How do I request an input or output file under MacPerl?
require 'StandardFile.pl';
$infilename = &StandardFile::GetFile('TEXT','ttxt','ttro' , "Default file");
$outfilename = &StandardFile::PutFile("Output file", "Default output file");
how can I locate StandardFile.pl if it is freely accessible? I have
checked out cgi-lib.pl and CGI.pm so far.
thanks for any help,
Karl B
------------------------------
Date: Wed, 05 Nov 1997 15:02:08 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: newbie seeks standardfile.pl for MacPerl
Message-Id: <comdog-ya02408000R0511971502080001@news.panix.com>
In article <kbillert-ya023580000511971427210001@news.cyberenet.net>, kbillert@cyberenet.net (k w billerts) wrote:
>I am new to the Perl environment and am using MacPerl. I would like to
>develop some basic CGI scripts and obtained the following info from a
>MacPerl FAQ:
>
>2.3.1) How do I request an input or output file under MacPerl?
>
>require 'StandardFile.pl';
>how can I locate StandardFile.pl if it is freely accessible? I have
>checked out cgi-lib.pl and CGI.pm so far.
did you look in the lib directory of the MacPerl folder? StandardFile.pl
is part of the standard MacPerl distribution.
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Wed, 05 Nov 1997 09:24:35 -0700
From: "Karl K. Scherer" <scherer@gene.COM>
Subject: Perl BINARY for VMS
Message-Id: <34609D8F.8AA9940A@gene.com>
Has someone out there a _binary_ of perl V5 for VMS?
Possibly with socket extensions for Multinet TCP/IP stack?
Karl Scherer - Genentech, Inc scherer@gene.com
------------------------------
Date: Sun, 02 Nov 1997 12:20:48 GMT
From: chizl@SPAMkarland.com (Chizl)
Subject: Perl CGI is haunted
Message-Id: <345c6df6.7258760@news.unicomp.net>
Someone tell me what is wrong when a Mail form CGI is changed, the
email address on the HTML end it works only if I use chizl@karland.com
If I use anything else I get a server error.
This is our domain at http://www.karland.com and we have this problem
randomly.. I have had the mail form up for about a week now and I
havnt had any problems till now.. When I changed the email address to
chzil@karland.com it started working again.. Then I changed it back
to regset@karland.com it gave server errors.. The HTML form can be
found at http://www.karland.com/OurProducts/RegSet32/ We tried
setting up different email addresses and all of them would give us
server errors.. What does this supposed to mean.. This is running on
a UNIX!
Thanx for anything you can provide me..
s
L8r,
Chizl - CEO
Karland International
www.karland.com
------------------------------
Date: Wed, 05 Nov 1997 14:41:05 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl CGI is haunted
Message-Id: <comdog-ya02408000R0511971441050001@news.panix.com>
In article <345c6df6.7258760@news.unicomp.net>, chizl@SPAMkarland.com wrote:
>Someone tell me what is wrong when a Mail form CGI is changed, the
>email address on the HTML end it works only if I use chizl@karland.com
>If I use anything else I get a server error.
some snippets would be nice - your source might be haunted, but i'm
having trouble channeling it through my newsreader :)
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 05 Nov 1997 13:06:40 -0800
From: hermit@cats.ucsc.edu (William R. Ward)
Subject: Re: Perl Format Command
Message-Id: <waa67q7nj8f.fsf@ese.UCSC.EDU>
"Gary C. New" <gnew@southernvirginia.edu> writes:
> I've looked and looked and looked for examples and faq's for perl's
> format command (I have a perl manuel). I still don't completely
> understand how to implament it especially with regards to cgi and
> printing to MAIL file handle.
Run, don't walk, to your nearest bookstore and get _Programming Perl_,
2nd Edition, by Larry Wall, Tom Christiansen, and Randal L. Schwartz.
That is the "Camel Book" that we always refer to here and is the only
Perl book you will ever need.
> Can anyone direct me to an indepth review of the format command and how
> to get the output to remain the same after sending it through MAIL.
open (MAIL, "|/usr/lib/sendmail $mailto") or die "Error opening MAIL: $!\n";
print MAIL "Subject: $subject\n\n";
write MAIL;
close MAIL or die "Error closing MAIL: $!\n";
format MAIL =
@*
.
format MAIL_TOP =
This is the message:
--------------------
.
__END__
Note that the labels of the format statements match the name of the
filehandle. Another way to do it is by using select(MAIL) and *then*
setting $^ and $~ to whatever format statement labels you wish.
HTH.
--Bill.
--
William R Ward Bay View Consulting http://www.bayview.com/~hermit/
hermit@bayview.com 1803 Mission St. #339 voicemail +1 408/479-4072
hermit@cats.ucsc.edu Santa Cruz CA 95060 USA pager +1 408/458-8862
------------------------------
Date: 5 Nov 1997 21:48:54 GMT
From: bgoffe@cook.cba.usm.edu (Bill Goffe)
Subject: Perl Programmer Wanted
Message-Id: <63qpk6$jk0$1@thorn.cc.usm.edu>
A Perl programmer is needed to help with a project. Basically, this project
involves writing a tool to generate HTML for the FAQ for sci.econ.research.
I've looked far and wide to find a tool that would fit my needs, and I
haven't been able to find one, so I would like to have one written. Funding
has been obtained for this project.
See <http://wueconb.wustl.edu/~goffe/EconFAQ.trial/why.htm> for further
discussion and some background. In addition, I've written up a more detailed
description of exactly what I'm looking for that I can mail out.
--
.---. Bill Goffe Bill.Goffe@usm.edu
( | Dept. of Econ. and International Business office: (601) 266-4484
)__*| University of Southern Mississippi fax: (601) 266-4920
(_| Southern Station, Box 5072
Hattiesburg, MS 39406-5072
------------------------------
Date: 5 Nov 1997 18:47:48 GMT
From: "Jack" <NoSPAMa-jackg@microsoft.com>
Subject: PERL->ADO->SQL
Message-Id: <01bcea1b$72530030$a0e4369d@jackg>
Using PERL WIN32, does anyone have any sample code using the ADO command
object to execute SQL code (preferably an MS SQL stored procedure)?
------------------------------
Date: Wed, 5 Nov 1997 15:14:07 -0600
From: rwh@visi.com (Richard Hoffbeck)
Subject: Re: Perl->Java? Java->Perl? Gaaaaa!
Message-Id: <MPG.eca9d995605c0729896a8@fw2.mwcia.org>
[This followup was posted to comp.lang.java and a copy was sent to the
cited author.]
In article <878667641.15181@dejanews.com>, dg50@chrysler.com says...
> I've got a nasty little problem I'd like some advice on.
[stuff deleted]
> So, Java, right? "Write once, run anywhere" right? (I can count on having
> access to a Java-enabled web browser, at least)
>
> So I sketch out a nifty user interface (based loosly on the Win95 Network
> Control Panel) and call up the AWT specs, and... gaaaa, who designed this
> language? It's like trying to read a cookbook written by George Orwell in
> a 1984-ish mood, shortly after ingesting some alien hallucinagen! People
> actually *use* this and accomplish stuff? Inconceivable!
>
> I want my nice, comprehensible perl code back!
>
> So I guess what I want to do is write this app in perl, with some sort of
> ties to a windowing package of some sort, that I can then compile to Java
> bytecode (with all the windowing calls mapped to AWT, of course) that can
> then be wrapped up in a web page that resides on the user's local machine
> to be invoked by a browser bookmark.
One way to make life easier is to pick up a good interactive Java system
like Visual Cafe, JBuilder, etc. Then a lot of the work behind the ui is
hidden and you can concentrate on coding the functionality. There is
suppose to be a java class around that provides some of the tokenizing
and regular expression functions of perl that could help some.
Option 2 would be to fire up tcl/tk to do the ui and keep perl behind the
scenes but the install/maintainence problems could be a real nightmare.
But you'll have this problem to a certain extent because you'll need to
make sure the jvm/awt/etc are installed on the target system. You also
have to make sure that any 1.1 features are supported on the browser
client if you go the applet route.
>
> Or do I?
>
> I don't care if the compilation process results in my java program
> containing the perl interpreter, I don't care if native Java would result
> in a file size 100 times smaller, I just want to get this done without
> having to teach myself Java from scratch to accomplish what would be an
> hour long job in perl.
>
How long do you figure it will take to (a) teach perl to write java byte-
code or (b) rewrite perl to run as a java application :-)
> (and there's this issue of reading/writing local files too - this may not
> be runnable from a browser window, the machine this runs on may require
> the Java RTE no matter what - in which case I have to install some sort
> of RT package on the machine no matter what, throwing the "univeriallity"
> of Java right out the window...)
Depending on the specifics, you could either write this as a java
application rather than applet or jigger the security settings to allow
the java application access to some space on the local file system.
--rick
--
+-----------------------------------------------------------------+
| Richard Hoffbeck <rwh@visi.com> phone: 612.897.6442 |
| Mn Worker's Compensation Insurer's Assoc fax: 612.897.6495 |
| 7760 France Ave, Suite 640 |
| Minneapolis, MN 55435 |
| |
| Finger rwh@visi.com for PGP key : |
| Fingerprint = 1C DD 13 FB 11 1D E7 73 2F A1 9B 52 86 0F A2 2B |
+-----------------------------------------------------------------+
------------------------------
Date: Wed, 05 Nov 1997 11:59:59 -0500
From: "Michael A. Suarez" <msuarez@cybernet.com>
Subject: Protecting Perl Source
Message-Id: <3460A60E.93930AA0@cybernet.com>
What is a good way to protect perl source... I want to give some perl
programs to a client, but I need to keep them from being modified,
edited, etc. I want to distribute them more as binaries, but compiling
them is not allowed. Any ideas?
Michael
------------------------------
Date: Wed, 05 Nov 1997 12:30:54 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Protecting Perl Source
Message-Id: <comdog-ya02408000R0511971230540001@news.panix.com>
In article <3460A60E.93930AA0@cybernet.com>, msuarez@cybernet.com wrote:
>What is a good way to protect perl source... I want to give some perl
>programs to a client, but I need to keep them from being modified,
>edited, etc. I want to distribute them more as binaries, but compiling
>them is not allowed. Any ideas?
you could always read the Perl FAQ or talk to your intellectual property
lawyer...
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 5 Nov 1997 20:23:13 GMT
From: henryg@ernie.WPI.EDU (Henry Gabryjelski)
Subject: Q: locking and re-writing file
Message-Id: <63qkjh$6s4$1@bigboote.WPI.EDU>
My question is:
Will the following code set the new size correctly?
Are there any gotcha's I should watch for?
I am attempting to assure that the file containing all the data I need
only gets wiped when it is locked. That prevents me from open'ing the
file with O_TRUNC. Is there an easy way to accomplish this?
Henry Gabryjelski
... Module Code Snippet ...
my $fh = IO::File->new( $file, O_WRONLY ); # need fh for flock
flock( $fh, LOCK_EX ); # exclusive to write
seek( $fh, 0, SEEK_SET ); # reset to start of file
my $value;
foreach $value (@list) { print $fh $value } # Whatever...
flock( $fh, LOCK_UN ); # Play nicely
------------------------------
Date: Wed, 05 Nov 1997 12:12:40 -0600
From: indhiraa@hotmail.com
Subject: Questions: pod2html
Message-Id: <878753283.20965@dejanews.com>
Hi All:
I am using Perl 5.004. I have the following questions regarding
pod2html.
a) How can I generate an index.html for each directory of pod files.
b) This is regarding the base URL. I want the HTML files to contain the
tag <BASE = "URL"> for the base URL. --htmlroot option doesn't seem
do this, even though it claims to do something with the base URL
stuff.
Is there any improved versions of pod2html which can do these things.
Thanks.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Wed, 05 Nov 1997 16:35:23 -0500
From: app6042 <mgalbreath@troweprice.com>
Subject: Sorting and Counting with PERL
Message-Id: <3460E69B.6EA1BB92@troweprice.com>
This is a multi-part message in MIME format.
--------------C649016A5221002A3CDCA5C3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I can't fathom a solution for this. I have a list of about 80,000
timestamps, e.g.,
03/Jun/1997:13:34:13
03/Jun/1997:13:34:13
03/Jun/1997:13:36:13
03/Jun/1997:13:36:13
03/Jun/1997:13:36:13
03/Jun/1997:13:36:13
03/Jun/1997:13:36:13
03/Jun/1997:13:36:13
03/Jun/1997:13:36:13
03/Jun/1997:13:36:13
03/Jun/1997:13:36:13
03/Jun/1997:13:36:14
03/Jun/1997:13:36:14
03/Jun/1997:13:36:14
03/Jun/1997:13:36:14
03/Jun/1997:14:11:41
03/Jun/1997:14:11:41
03/Jun/1997:14:11:41
03/Jun/1997:14:11:41
03/Jun/1997:14:11:41
I need to use PERL to count the number of instances each unique
timestamp occurs. Can someone please help me on this?
Thanks,
Mark
--------------C649016A5221002A3CDCA5C3
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Mark Galbreath
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Mark Galbreath
n: Galbreath;Mark
org: TRPIT
email;internet: mgalbreath@troweprice.com
title: Internet Systems Analyst
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
version: 2.1
end: vcard
--------------C649016A5221002A3CDCA5C3--
------------------------------
Date: 05 Nov 1997 11:26:52 +0100
From: Hedderik van Rijn <rijn@swi.psy.uva.nl>
Subject: Re: Sys::Syslog not working on Linux
Message-Id: <x07manfxg3.fsf@swipc30.swi.psy.uva.nl>
mike@stok.co.uk (Mike Stok) writes:
> >I was just playing with the Sys::Syslog module, and I can't get it to
> >work.
>
> Have you started syslogd with the -r flag? My man syslogd man page says:
Or you can use the patch for the Sys:Syslog module that was posted some
time ago (971012) by Andreas Trottmann, found it about a week ago using
DejaNews.
Greetings,
Hedderik.
------------------------------
Date: Thu, 06 Nov 1997 19:53:13 +0100
From: Maciej Grochal <mgrochal@vela.filg.uj.edu.pl>
Subject: talk and perl
Message-Id: <34621219.9766EE3D@vela.filg.uj.edu.pl>
Hi,
does anyone have any idea or links to a web pages with talk online?
don't let me wait.
maciek grochal
------------------------------
Date: Wed, 05 Nov 1997 14:49:10 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: talk and perl
Message-Id: <comdog-ya02408000R0511971449100001@news.panix.com>
In article <34621219.9766EE3D@vela.filg.uj.edu.pl>, Maciej Grochal <mgrochal@vela.filg.uj.edu.pl> wrote:
>does anyone have any idea or links to a web pages with talk online?
>don't let me wait.
<URL:http://search.yahoo.com/search?p=perl+chat>
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Wed, 5 Nov 1997 14:24:19 -0600
From: "kinlam" <kinlam@mec.cuny.edu>
Subject: trying to install fastcgi
Message-Id: <63ql7r$qdi@news.cuny.edu>
Hi :
I am trying to install the fastcgi module that I download from CPAN. I
ran into problem when I try to complie it
the error what the I didn't install perl with the option of 'lsfio'. So, I
recomplie perl(reinstall) ,and I noticed that lib lsfio
was not found.
My question is how I can obtain lsfio ,and what is it anyway(I am using
GNU gcc) !
any post or e-mail comment with be appreciated
Kin Lam
E-mail : kinlam@mec.cuny.edu
------------------------------
Date: Wed, 05 Nov 1997 15:07:26 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: trying to install fastcgi
Message-Id: <comdog-ya02408000R0511971507260001@news.panix.com>
In article <63ql7r$qdi@news.cuny.edu>, "kinlam" <kinlam@mec.cuny.edu> wrote:
> I am trying to install the fastcgi module that I download from CPAN. I
>ran into problem when I try to complie it
>the error what the I didn't install perl with the option of 'lsfio'. So, I
>recomplie perl(reinstall) ,and I noticed that lib lsfio
>was not found.
> My question is how I can obtain lsfio ,and what is it anyway(I am using
>GNU gcc) !
did you check the instructions at <URL:http://www.fastcgi.com>?
did you look on CPAN [1] for the sfio distribution?
did you search Dejanews [2] in this newsgroup to read past threads that
give very helpful suggestions, especially for using gcc to compile
sfio?
[1]
Comprehensive Perl Archive Network
find one near you at <URL:http://www.perl.com>
[2]
Dejanews
<URL:http://www.dejanews.com>
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 5 Nov 1997 19:50:22 GMT
From: klassa@aursgh.aur.alcatel.com (John M. Klassa)
Subject: where are deliverlib/audit.pl and deliverlib/mh.pl (Tom C)?
Message-Id: <63qilu$am2$1@aurwww.aur.alcatel.com>
In reading old c.l.p.m articles, I came across:
<453edm$qmh@csnews.cs.colorado.edu>
in which Tom Christiansen presents a message filtering script written in Our
Favorite Language. Near the top, I see:
require 'deliverlib/audit.pl';
require 'deliverlib/mh.pl';
I'm not familiar with these, nor can I seem to find them. Anybody know
where I might be able to find a copy?
Thanks!
John
--
John Klassa / Alcatel Telecom / Raleigh, NC, USA <><
All those who believe in psychokinesis, raise my hand...
------------------------------
Date: Wed, 05 Nov 1997 14:21:35 -0700
From: "Timothy H. Keitt" <tkeitt@santafe.edu>
Subject: Re: why (and when) does undef == 0?
Message-Id: <3460E35F.3057@santafe.edu>
O.K. You answered the "when" question, but not what I was really
after. The problem with undef() being equivalent to zero in algebraic
expressions is that you can't then use undef() as a return value to
indicate an error in a subroutine, so
$corr = &cov($ar1, $ar2) / (&std($ar1)*&std($ar2));
causes a divide by zero runtime error if &std returns undef() and
assigns zero as the result if &cov returns undef(). If the entire
expression returned undef() when any of the operands were undefined,
then you only need to check $corr to see if it is defined. Otherwise,
you have to check the return value of each function seperately.
Basically, I think coercing undefined values (and strings for that
matter) to be equal zero is a bad idea.
Tim
brian d foy wrote:
>
>
> from an algebraic perspective, the order of operands is important. in
> your first case you are operating on 10 (a number) and get a number
> back. in the second case, you operate on undef and get undef. this
> seems to be reasonable behaviour - in an algebraic sense.
>
------------------------------
Date: 5 Nov 1997 20:04:08 GMT
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: Re: Why no case statement in Perl?
Message-Id: <01bcea25$f9df9400$3e03b480@mm.CC.lehigh.EDU>
> I often use the case statement in other languages. Anyone know the
reason
> there is none in Perl? It seems odd to be limited to If-elsif-else
> statements.
I found the following in Camel 2nd Ed p.104:
"The bare block is particularly nice for doing case structures (multiway
switches).
SWITCH: {
if (/^abc/) { $abc = 1; last SWITCH }
if (/^def/) { $def = 1; last SWITCH }
if (/^xyz/) { $xyz = 1; last SWITCH }
$nothing = 1;
}
"
------------------------------
Date: Wed, 5 Nov 1997 15:11:32 -0600
From: "Billy Patton" <bpatton@asic.sc.ti.com>
Subject: Re: Why no case statement in Perl?
Message-Id: <63qobi$fb$1@spock.asic.sc.ti.com>
or
while (<IN>)
{
/^\s*regexp/ && do
{
do something
next;
};
}
Phil R Lawrence wrote in message
<01bcea25$f9df9400$3e03b480@mm.CC.lehigh.EDU>...
>> I often use the case statement in other languages. Anyone know the
>reason
>> there is none in Perl? It seems odd to be limited to If-elsif-else
>> statements.
>
>I found the following in Camel 2nd Ed p.104:
>
>"The bare block is particularly nice for doing case structures (multiway
>switches).
>
> SWITCH: {
> if (/^abc/) { $abc = 1; last SWITCH }
> if (/^def/) { $def = 1; last SWITCH }
> if (/^xyz/) { $xyz = 1; last SWITCH }
> $nothing = 1;
> }
>"
------------------------------
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 1275
**************************************