[14018] in Perl-Users-Digest
Perl-Users Digest, Issue: 1428 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 19 14:06:01 1999
Date: Fri, 19 Nov 1999 11:05:42 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <943038342-v9-i1428@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 19 Nov 1999 Volume: 9 Number: 1428
Today's topics:
Re: "The Art of Perl" (was Re: Perl programming sytle) (Scott McMahan)
Re: "The Art of Perl" (was Re: Perl programming sytle) (Josh Geller)
Re: 5.005_03 v/s 5.004_03 (M.J.T. Guy)
[JOB]: Web Developer/Senior Web Developer: SGML, XML, P <richard@semantico.com>
Re: Adding to @INC during perl install <tpost@intelihealth.com>
Re: adjusting HTML <gisle@aas.no>
Re: adjusting HTML <gellyfish@gellyfish.com>
Re: another Reg. Exp. problem <lr@hpl.hp.com>
Re: binary database <alanis@softhome.net>
Re: Call for Programs: the "phonecode" benchmark (Randal L. Schwartz)
Re: Call for Programs: the "phonecode" benchmark <rhomberg@ife.ee.ethz.ch>
Can Perl return the ASCII code for a given character? <look@signature.com>
Re: Can Perl return the ASCII code for a given characte (Sam Holden)
Re: Can Perl return the ASCII code for a given characte <slanning@bu.edu>
Re: Can Perl return the ASCII code for a given characte <michel.morin@ouest-france.fr>
Re: Can Perl return the ASCII code for a given characte (Simon Cozens)
Re: Can Perl return the ASCII code for a given characte <michel.morin@ouest-france.fr>
Re: Can Perl return the ASCII code for a given characte (Simon Cozens)
Re: Can Perl return the ASCII code for a given characte <michel.morin@ouest-france.fr>
CGI question <venkatesh.kumar@sabre.com>
Re: CGI question <latsharj@my-deja.com>
Re: CGI question <jeff@vpservices.com>
Compiling perl into win32 app? <rrindels@arkansas.net>
Re: Compiling perl into win32 app? (Kragen Sitaker)
Re: Database Locking (Help!) (M.J.T. Guy)
Re: Database Locking (Help!) <moseley@best.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 19 Nov 1999 17:52:56 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: "The Art of Perl" (was Re: Perl programming sytle)
Message-Id: <Y7gZ3.277$AQ2.22013@newshog.newsread.com>
> I was recently "chastised" by someone for programming perl on WinNT
> like I program C on UNIX. He insisted that I should programm more
> "perl-like" and many of the constructs he suggested as changes were
> definately not C-like, and were definately harder to read. (IMO)
My opinion is that he needs something better to worry about. I write
in about 5 languages, and if I can get it to compile at all, I'm
happy. I write C-like Perl, Java-like C++, Delphi-like Java and so on;
use the best way of expressing the problem you can, and it should be
something that anyone else can follow. A solution should be obvious
enough for a competent programmer to follow (and usually a multi-line
C-ish construction is easier to follow than a super-dense Perl one-liner
that uses operators in weird ways to achieve some effect). Some things
are more "Perlish" and need regexes and stuff, but other things are more
"algorithmal" or "procedural" and can be expressed in any of the valid
alternatives.
Scott
http://autoperl.skwc.com Automating Windows With Perl
------------------------------
Date: 19 Nov 1999 18:04:40 GMT
From: dclxvi@best.com (Josh Geller)
Subject: Re: "The Art of Perl" (was Re: Perl programming sytle)
Message-Id: <38359138$0$211@nntp1.ba.best.com>
In article <Y7gZ3.277$AQ2.22013@newshog.newsread.com>,
Scott McMahan <scott@aravis.softbase.com> wrote:
>> I was recently "chastised" by someone for programming perl on WinNT
>> like I program C on UNIX. He insisted that I should programm more
>> "perl-like" and many of the constructs he suggested as changes were
>> definately not C-like, and were definately harder to read. (IMO)
Sounds like an asshole.
> My opinion is that he needs something better to worry about.
Or a good smack upside the head, one.
------------------------------
Date: 19 Nov 1999 14:19:04 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: 5.005_03 v/s 5.004_03
Message-Id: <813m8o$1c1$1@pegasus.csx.cam.ac.uk>
In article <Pine.GSO.4.10.9911181801400.16575-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@redcat.com> wrote:
>On Thu, 18 Nov 1999, ylegrice wrote:
>
>> String found where operator expected at (eval 2056) line 1, near "% =
>> ''"
>> (Missing operator before ''?)
>>
>> Actually, I get one of these messages for each file passed to the
>> script. However, when I try to find a line inside my script that
>> matches the "% = ....", I can't find it.
>
>That's because it's not in your script. It's in the 2056th eval STRING
>which is compiled during the course of your script. What's on line 1 of
>that eval string?
It can of course be quite difficult to find what exactly the 2056th
eval STRING is. But if you run under the perl debugger, you'll get a
traceback which includes, inter alia, the text of the eval. Saves
a lot of pain.
And as a rule of thumb (there are counterexamples), if you're using
eval STRING, there's almost certainly a better way of doing it -
more efficient / clear / secure.
Mike Guy
------------------------------
Date: Fri, 19 Nov 1999 12:29:44 +0000
From: Richard Padley <richard@semantico.com>
To: "brighton-lug-misc-list@jswan.demon.co.uk" <brighton-lug-misc-list@jswan.demon.co.uk>
Subject: [JOB]: Web Developer/Senior Web Developer: SGML, XML, PERL5, LINUX
Message-Id: <383542B8.16324800@semantico.com>
Semantico Limited
Web Developer/Programmer
Semantico work with major publishing companies to create large-scale
Internet resources for academic and other specialist interest groups.
Based in central Brighton, we are currently looking to add a developer
to our team. This position could be at a senior level for the right
candidate.
A broad range of skills are required and some can be picked up at
Semantico, however it is essential that you have experience in:
* Perl 5, including OO techniques and module creation,
* fluent HTML and familiarity with JavaScript,
* CGI/ASP scripting;
* XML/SGML document processing,
and desirable that you have knowledge or experience of:
* using Unix/Linux tools & environment,
* Administering IIS and NT 4.0,
* SQL.
The salary range for the right person is dependent on your experience
but will be in the range of 22-26K for a developer at the intermediate
level and up to 35K for a senior developer.
Please send a CV with a covering letter to either
recruitment@semantico.com or to:
Adrian Driscoll, Semantico, 2nd Floor, 38 Ship Street, Brighton
BN1 1AB.
If you would like to call us to find out more call either Adrian or
Richard at 01273 722222 during normal office hours.
------------------------------
Date: Fri, 19 Nov 1999 08:43:33 -0500
From: Tony Demark <tpost@intelihealth.com>
Subject: Re: Adding to @INC during perl install
Message-Id: <38355405.18EC862@intelihealth.com>
Yep ... I am surprised that there doesn't seem to be a way to do this
easily. I guess I should feel better, though, at least I wasn't just
being stupid and missing something obvious! =)
- Tony
Martien Verbruggen wrote:
> But, I think he rather was asking for a way to change the system wide
> configuration of his perl instalation. The above two solutions will only
> work for a single script.
------------------------------
Date: 19 Nov 1999 11:05:59 +0100
From: Gisle Aas <gisle@aas.no>
Subject: Re: adjusting HTML
Message-Id: <m3n1sa7q48.fsf@eik.g.aas.no>
David Cassell <cassell@mail.cor.epa.gov> writes:
> To get it right
> in the general case, you need something which can do the tokenizing
> which HTML::Parser does. BTW, it is not really a parser of HTML,
> so the name is somewhat misleading.
ISO 8879 define "SGML parser" like this:
| 4.285 SGML parser: A program (or portion of a program or a
| combination of programs) that recognizes markup in SGML documents.
|
| NOTE - If an analogy where to be drawn to programming language
| processors, an SGML parser would be said to preform the functions of
| both a lexical analyzer and a parser with respect to SGML documents.
I think that HTML::Parser is a _parser_ according to this definition,
and that the name is _not_ misleading.
--
Gisle Aas
------------------------------
Date: 19 Nov 1999 10:24:17 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: adjusting HTML
Message-Id: <38352551_1@newsread3.dircon.co.uk>
Jeff Sack <sackj@rpi.edu> wrote:
>>
>> Use HTML::Parser - I have posted a number of examples in the last few
>> weeks.
>
> I checked through the examples and also through the documentation. I'm not
> sure that HTML::Parser is exactly what I want. Suppose I have a scalar
> $html that contains the entire HTML file. I want the scalar back exactly
> the way it was (carriage returns and all) plus or minus a few words inside
> certain tags. It seems that with the HTML::Parse module, I have to define
> callbacks that will reconstruct the original HTML and make the desired
> modifications as the parsing is done. Other possible solutions seem to
> involve reconstructing the original HTML based on complex data structures
> (like HTML::TreeBuilder). Since one of my concerns is making as few changes
> as possible to the original file, reconstructing it is not an attractive
> option.
>
> I guess what I want is something that will reliably give me exactly what's
> inside the <H1> tags for example. I want to be able to modify that and have
> it placed back in the scalar $html. Is there something that will give me a
> reference to a substring so that I can modify the substring and the larger
> string will also be affected? I hope this question makes sense.
>
Of course (and this is off-topic really) the actual way that the stuff in
the original HTML file is should not matter (except in the case of <PRE></PRE>
sections of course) as long as you preserve the relation between them.
I think that your concern about preserving the contents of the file as you
found them is probably an unnatural barrier that you have erected for
yourself. Basically we are trying to guide you away from the idea that
you might be tempted to use a regular expression on your HTML - of course
theres nothing stopping you from doing that its just that you wont get
much encouragement and help beyond being told to read the perlre manpage -
you might also want to check out the innumerable threads in this group
where people have been disabused of the notion that it is easy to manipulate
HTML using regular expressions.
Tell you what - give us a URL of a page that you want changed and tell us
how you want it changed and we'll have a little fun over the weekend ;-}
/J\
--
"As usual I'm the price you have to pay for the funny bits" - Denis Norden
------------------------------
Date: Fri, 19 Nov 1999 09:37:08 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: another Reg. Exp. problem
Message-Id: <MPG.129f2a9d4ec6409a98a23b@nntp.hpl.hp.com>
In article <slrn839ih3.12l.tadmc@magna.metronet.com> on Thu, 18 Nov 1999
22:55:15 -0500, Tad McClellan <tadmc@metronet.com> says...
+ On Mon, 15 Nov 1999 11:52:16 -0800, Larry Rosler <lr@hpl.hp.com>
wrote:
+ >The '/s' modifier affects *only* the
+
+ Unless you have set $*, that is.
+
+ But setting $* is deprecated, so nobody uses it anymore.
+
+ And it's not germane to the original problem anyway (but when
+ I saw the high emphasis, I thought I should point it out).
Score mucho pedantry points.
+ >interpretation of the '.' metacharacter in a regex, and there aren't
+ >and of those in there, are there?
+
+ ----------------
+ #!/usr/bin/perl -w
+ use strict;
+
+ $* = 1;
+
+ $_ = "foo\nbar\nbaz";
+
+ if ( /^ba/ )
+ { print "matched without //s\n" }
+
+ if ( /^ba/s )
+ { print "matched with //s\n" }
+ ----------------
Why not let deprecated dogs die? That includes $[ as well as $*.
The /m modifier takes care of your example, as you know.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 18 Nov 1999 20:28:02 -0800
From: "Steven Lybeck" <alanis@softhome.net>
Subject: Re: binary database
Message-Id: <812jri$bfr$1@ultra.sonic.net>
The reason I want to use something written completely in perl is because I
use a host where compiled implementations of databases are not, and can not
be installed. The only CGI that can be supported is perl.
You mentioned using pack() and unpack(). I was wondering what the use of
this would be? Would it be to shorten the number of read()'s necessary on
the file by reading many records with one read, and then splitting them?
Anyways, thanx for the suggestions before.
Hope to hear from you soon.
~ Steven E. Lybeck
steven@neteze.com
alanis@softhome.net
------------------------------
Date: 18 Nov 1999 21:16:00 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Call for Programs: the "phonecode" benchmark
Message-Id: <m1emdn6oz3.fsf@halfdome.holdit.com>
>>>>> "Anno" == Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:
Anno> Speaking of coincidence, though... The problem that Lutz wants
Anno> coded in various languages (note lack of qualifier to accommodate
Anno> sensibilities) is exactly what Randal published in *mumble* about
Anno> a month ago: Finding words from a dictionary that correspond to
Anno> a given phone number. He may want to comment himself.
It is indeed a strange coincidence. The problem is not completely
identical, but I did think for a moment of submitting my column
(located as the latest in the series at
<http://www.stonehenge.com/merlyn/UnixReview/>) as my solution.
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Fri, 19 Nov 1999 12:19:41 +0100
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: Call for Programs: the "phonecode" benchmark
Message-Id: <3835324D.97B5A653@ife.ee.ethz.ch>
Uri Guttman wrote:
> good point. he wants multiple submissions for each maguage so he can see
> a variety of ways to do it. i am not sure this is a worthy project and
> the posed problem is too annoying for me to spend time on it. someone on
> FWP posted a mostly working solution. it was only 5 lines or so and
> could be improved a great deal. the contest also asks for quality code
> (formatting, comments, design notes, etc.). if someone here were to
> start a thread on a solution, maybe we could do a group coding in perl
> golf mode or something like that. kick some other languages butt's like
> in the practice of programming (perl had the shortest code by far and
> 2nd fastest run time).
OK, maybe I should add my 2 Rp...
1. It doesn't look like homework. The guy has a Dr. (PhD)
2. I told him he his old version of Perl should remain his problem and
not that of a coder, and he agreed.
3. I think he is interested in how fast someone can solve the problem
with his language. A group effort would result in short and fast code
without indication on how long an individual needed to solve the
problem.
4. I submitted my solution, which I post here, so you can shred it to
pieces...
- Alex
#!/usr/bin/perl -w
use strict;
# I don't check any commandline params, they will be correct!
my $telnos = pop;
#slurp dictionary
my @dictionary = map {chomp; $_} <>;
# translation table
# E | J N Q | R W X | D S Y | F T | A M | C I V | B K U | L O P | G H Z
# e | j n q | r w x | d s y | f t | a m | c i v | b k u | l o p | g h z
# 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
my @numbers = map {lc} @dictionary; #copy and translate to lower case
tr/a-z\"-/57630499617851881234762239/d for @numbers; #needs perl 5.005
#@numbers now contains a numerical encoding for each word
#construct a hash with number => [possible,words]
my %number_words;
push @{$number_words{$numbers[$_]}}, $dictionary[$_] for (0..$#numbers);
sub find_known_nums;
use Carp;
sub find_nums {
#nice and exponentially recursive
local $_ = shift;
my @retval = find_known_nums ($_);
return if @retval && !defined $retval[0]; #retrofitted antibacktrack
return @retval if @retval;
return $_ if length == 1;
my $first = substr $_,0,1;
@retval = find_known_nums(substr $_,1);
return unless defined $retval[0];
return map {"$first $_"} @retval; #prepend $first
}
sub find_known_nums {
#nice and exponentially recursive
my $arg = shift;
my @returnval;
my $hasword;
my $head;
for my $len (1 .. length($arg) - 1) {
next unless exists $number_words{$head = substr $arg,0,$len};
$hasword++; #retrofit anti-backtrack
my @found=find_nums(substr $arg, $len);
for my $tail (@found) {
push @returnval, map {"$_ $tail"} @{$number_words{$head}};
}
}
push @returnval, @{$number_words{$arg}}
if exists $number_words{$arg};
return undef if $hasword && !@returnval;
return @returnval;
}
@ARGV = ($telnos);
while(<>) {
chomp;
my $save = $_;
tr|- /||d; #delete all non numbers
my @foundstrs = find_nums($_);
for my $found (@foundstrs) {
print "$save: $found\n";
};
}
------------------------------
Date: Thu, 18 Nov 1999 22:51:22 -0600
From: "David Cannon" <look@signature.com>
Subject: Can Perl return the ASCII code for a given character?
Message-Id: <JF4Z3.27392$YI2.1239476@typ11.nn.bcandid.com>
I need a Perl equivalent to Visual Basic's ASC() function. I need Perl to
return the ASCII code for a given character. Is there a way?
David <><
***** david@emeraldis.com *****
------------------------------
Date: 19 Nov 1999 04:50:52 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Can Perl return the ASCII code for a given character?
Message-Id: <slrn839lpu.5fp.sholden@pgrad.cs.usyd.edu.au>
On Thu, 18 Nov 1999 22:51:22 -0600, David Cannon <look@signature.com> wrote:
>I need a Perl equivalent to Visual Basic's ASC() function. I need Perl to
>return the ASCII code for a given character. Is there a way?
perldoc -f ord
--
Sam
Anyway, the other successor to C gobbled up two letters instead of one.
Which is why many Perl scripts have the extension, ``.pl'', finishing
off BCPL. --Larry Wall
------------------------------
Date: 19 Nov 1999 13:11:48 -0500
From: Scott Lanning <slanning@bu.edu>
Subject: Re: Can Perl return the ASCII code for a given character?
Message-Id: <kusln7uuza3.fsf@strange.bu.edu>
"David Cannon" <look@signature.com> writes:
> I need a Perl equivalent to Visual Basic's ASC() function. I need
> Perl to return the ASCII code for a given character. Is there a way?
When will you people see the light and buy the Perl Cookbook?
<insert smart-ass replies here>
------------------------------
Date: Fri, 19 Nov 1999 13:16:02 +0100
From: "Michel Morin" <michel.morin@ouest-france.fr>
Subject: Re: Can Perl return the ASCII code for a given character?
Message-Id: <813f1o$c2e$1@gaia.eurobretagne.fr>
Try chr(Number)
David Cannon a écrit dans le message ...
>I need a Perl equivalent to Visual Basic's ASC() function. I need Perl to
>return the ASCII code for a given character. Is there a way?
>
>David <><
>***** david@emeraldis.com *****
>
>
>
------------------------------
Date: 19 Nov 1999 12:32:40 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: Can Perl return the ASCII code for a given character?
Message-Id: <slrn83agr8.ksp.simon@othersideofthe.earth.li>
Michel Morin (comp.lang.perl.misc):
>David Cannon a écrit dans le message ...
>>I need a Perl equivalent to Visual Basic's ASC() function. I need Perl to
>>return the ASCII code for a given character. Is there a way?
>>
>Try chr(Number)
I hereby nominate this for CLPM wrong answer of the year.
--
Solipsists of the World... you are already united.
-- Kayvan Sylvan
------------------------------
Date: Fri, 19 Nov 1999 14:08:09 +0100
From: "Michel Morin" <michel.morin@ouest-france.fr>
Subject: Re: Can Perl return the ASCII code for a given character?
Message-Id: <813i3e$d69$1@gaia.eurobretagne.fr>
Why ?
it works on ActiveState Perl for Windows.
------------------------------
Date: 19 Nov 1999 13:18:16 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: Can Perl return the ASCII code for a given character?
Message-Id: <slrn83ajgo.ksp.simon@othersideofthe.earth.li>
Michel Morin (comp.lang.perl.misc):
>Why ?
>it works on ActiveState Perl for Windows.
No, it doesn't. Or at least, it doesn't do what was asked.
The question was:
Can Perl return the ASCII code for a given character?
That's
Given a character. Return number.
You said:
chr()
That's
Given a number. Return character.
And our survey said:
X
(ord)
--
"Yeah, but you're taking the universe out of context."
------------------------------
Date: Fri, 19 Nov 1999 14:17:34 +0100
From: "Michel Morin" <michel.morin@ouest-france.fr>
Subject: Re: Can Perl return the ASCII code for a given character?
Message-Id: <813il4$dd7$1@gaia.eurobretagne.fr>
oops ...
You're right. I misunderstood the question
I think my last answer make me win this first price in your "CLPM wrong
answer" !!!!
Michel Morin a écrit dans le message <813i3e$d69$1@gaia.eurobretagne.fr>...
>Why ?
>it works on ActiveState Perl for Windows.
>
>
>
>
------------------------------
Date: Fri, 19 Nov 1999 09:49:56 -0600
From: Venkatesh Kumar <venkatesh.kumar@sabre.com>
Subject: CGI question
Message-Id: <383571A4.6DFF550E@sabre.com>
Can someone let me know on how do I upload a file
through a browser using CGI to a server
Venky
------------------------------
Date: Fri, 19 Nov 1999 17:13:53 GMT
From: Dick Latshaw <latsharj@my-deja.com>
Subject: Re: CGI question
Message-Id: <8140g5$uhc$1@nnrp1.deja.com>
In article <383571A4.6DFF550E@sabre.com>,
Venkatesh Kumar <venkatesh.kumar@sabre.com> wrote:
> Can someone let me know on how do I upload a file
> through a browser using CGI to a server
Your problem does not seem to be Perl related. You would probably get
better information in a CGI specific news group like
comp.infosystems.www.authoring.cgi.
--
Regards,
Dick
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 19 Nov 1999 16:31:49 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: CGI question
Message-Id: <38357B2D.81A72293@vpservices.com>
Venkatesh Kumar wrote:
>
> Can someone let me know on how do I upload a file
> through a browser using CGI to a server
Use CGI.pm. It's documentation comes with a very thorough example of
uploading files. In fact, there's a whole example using it in today's
newsfeed on this group :-).
--
Jeff
------------------------------
Date: Fri, 19 Nov 1999 08:46:06 -0600
From: "Rodney Rindels" <rrindels@arkansas.net>
Subject: Compiling perl into win32 app?
Message-Id: <XvdZ3.88627$YB4.2974179@typ12.nn.bcandid.com>
I am wondering if it is possible to compile a win32 app with the
functionality of perl residing in it. {of course with the same limited
functionality of perl win32}. We are attempting to make a cross platform
application and do not want to bog down the clients. Also if just possible
to have very limited distribution of perl on client and call from win32
program to send stout and receive stin from the win32 version of perl?
Thanks,
Rodney
------------------------------
Date: Fri, 19 Nov 1999 18:52:22 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Compiling perl into win32 app?
Message-Id: <G%gZ3.28575$YI2.1316539@typ11.nn.bcandid.com>
In article <XvdZ3.88627$YB4.2974179@typ12.nn.bcandid.com>,
Rodney Rindels <rrindels@arkansas.net> wrote:
>I am wondering if it is possible to compile a win32 app with the
>functionality of perl residing in it.
Yes. perldoc -q compile.
>We are attempting to make a cross platform
>application and do not want to bog down the clients.
In that case, don't compile it -- just distribute the Perl script. No
Win32 app will not be cross-platform, by definition.
>Also if just possible
>to have very limited distribution of perl on client and call from win32
>program to send stout and receive stin from the win32 version of perl?
I don't understand the question.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 19 Nov 1999 14:08:57 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Database Locking (Help!)
Message-Id: <813llp$so$1@pegasus.csx.cam.ac.uk>
Bill Moseley <moseley@best.com> wrote:
>
>Typically, my lock file is my error log file.
>
> eval {
> local $SIG{ALRM} =
> CORE::sub {
> die "Timed out Waiting for File Lock\n"
> };
>
> alarm ( 10 );
>
> flock( LOG_FILE, LOCK_EX ) or die "failed to set lock '$!'";
> alarm 0;
> };
>
>
> if ($@) { die $@ };
If you're not going to do some more elaborate recovery, you can
dispense with the eval {}.
Mike Guy
------------------------------
Date: Fri, 19 Nov 1999 06:47:47 -0800
From: Bill Moseley <moseley@best.com>
Subject: Re: Database Locking (Help!)
Message-Id: <MPG.129f02ea30bac385989896@nntp1.ba.best.com>
M.J.T. Guy (mjtg@cus.cam.ac.uk) seems to say...
> Bill Moseley <moseley@best.com> wrote:
> >
> > if ($@) { die $@ };
>
> If you're not going to do some more elaborate recovery, you can
> dispense with the eval {}.
But I'd hope people do a bit more than just die.
I didn't think I needed to show the entire HTML error page, plus the
emailed message to the script administrator....
if ($@) { raise_a_stink( $@ ) };
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 1428
**************************************