[6503] in Perl-Users-Digest
Perl-Users Digest, Issue: 128 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 16 21:09:59 1997
Date: Sun, 16 Mar 97 18:00:24 -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 Sun, 16 Mar 1997 Volume: 8 Number: 128
Today's topics:
Re: [HELP] !@#$% sort subroutines... <John.Adams@BentonvilleAR.ncr.com>
[Q] userid in a client/server environment (Tan Tran)
Re: Calling html headers and footers <rootbeer@teleport.com>
Re: Can use SQL/NET v2 connect string in Perl module? (John D Groenveld)
cgi-lib.pl <mstich@erols.com>
Re: Elegant way to strip spaces off the ^ and $ of a va <gnat@elara.frii.com>
help setting documentroot expression <keng@wco.com>
Re: help splitting a file (Tad McClellan)
Re: help splitting a file <rootbeer@teleport.com>
Re: Help w/Perl5 & Cross Platfomr Perl <dbenhur@egames.com>
Re: How to make perl scripts appear locally on the brow (Andreas Koenig)
keys from nested data structures -- is there an easy wa <htaylor@mit.edu>
Multiple substitutions (Michael Schuerig)
Re: perl 5 on NT4 install help needed (badly) (Reinoud van Leeuwen)
Re: Perl frontend for MS Access (Clay Irving)
PERLDatabase broken!Need help! <chuckr@ptw.com>
Re: PERLDatabase broken!Need help! (revjack@radix.net)
PerlShop Questions <jeffo@execpc.com>
Re: Q: Good Perl Book <NOJUNKMAILbushong@bigger.com>
Secret but cool web site (Anthony Kanner)
Re: Server won't run Perl scripts <rootbeer@teleport.com>
Re: system calls (Tad McClellan)
System V IPC <vanguard@ee.mcgill.ca>
Re: The difference between GET and POST methods w/Perl <...petri.backstrom@icl.fi>
Unix vs WIN95 equivalents <M.P.Miller@worldnet.att.net>
Re: What's a good Perl book? slacker@dixonillinois.com
Re: What's wrong with "an email" (was: How to spam - le (Mike Long)
Re: Why doesn't flock() work properly on Solaris? (Ron Newman)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 16 Mar 1997 21:44:50 GMT
From: John Adams <John.Adams@BentonvilleAR.ncr.com>
Subject: Re: [HELP] !@#$% sort subroutines...
Message-Id: <332C69D2.5376@BentonvilleAR.ncr.com>
Well, I'm new at this myself, but maybe I can shed a little light here...
mblase@ncsa.uiuc.edu wrote:
>
>
> sub AlphaSort {
> local(@array) = @_;
> return sort Alphabetical @array; # return the sorted array ^^^^^^ return isn't used--and a "print @array" statement in here would help the debugging, since you'd see
that the array wasn't sorting.
> }
Instead, use:
sub AlphaSort {
local(@array) =@_;
@array = sort Alphabetical @array; #this will sort your array in place
@array; #The last line in the subroutine is the returned value.
}
>
> sub Alphabetical {
> local($a,$b) = @_;
> foreach($a,$b) {
> tr/A-Z/a-z/;
> s/^\s+//; # remove any leading whitespace
> s/^the\s+//;
> s/^a?\s+//; # remove either 'a' or 'an' ^^^^^^by the way, I think you want s/^an?\s+// here...what you have will, I think, eliminate the word
"a", but not "an".
> }
> return $a cmp $b;
> }
Probably some other glitches (at least one!), but that should be a start. I didn't test it, okay? And if I
goofed up, let me know. As I say, I'm new at this.
Hope it helps, Marty.
John Adams
------------------------------
Date: 16 Mar 1997 19:50:56 GMT
From: ttran@micro.ti.com (Tan Tran)
Subject: [Q] userid in a client/server environment
Message-Id: <5ghiv0$dj9$1@tilde.csc.ti.com>
Hi,
I have a server process (owned by a particular useid) running on a remote
host. The client process is invoked (by another userid) that communicates with
the server via TCP/IP socket. The client sends a command to the server to be
executed.
My question is how can I make the server execute the command from the client
using the userid of the person invoking the client process ?
Is there any "su"-like function in perl ?
Thanks and Regards,
+-----------------------+-----------------------------------------------+
| Tan Tran, MEE, P.E. | Disclaimer: |
| Texas Instruments | Opinions expressed are mine and in no way |
| ttran@micro.ti.com | reflect those of my employers. |
+-----------------------+-----------------------------------------------+
------------------------------
Date: Sun, 16 Mar 1997 15:47:50 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: bergy@abacom.com
Subject: Re: Calling html headers and footers
Message-Id: <Pine.GSO.3.96.970316154631.2782C-100000@kelly.teleport.com>
On Sat, 15 Mar 1997, Bergy wrote:
> I want to print an html response to a perl5 script and I would like to
> use .html files instead of placing 100% of the code in my source (icons
> bar and header...).
>
> I dont remeber the piece of code that could do this...
I think you're looking for open, close, and print in the perlfunc(1)
manpage. Some variation on 'print OUT <IN>;' might come in handy. Hope
this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 16 Mar 1997 15:27:13 -0500
From: groenvel@tholian.cse.psu.edu (John D Groenveld)
Subject: Re: Can use SQL/NET v2 connect string in Perl module?
Message-Id: <5ghl31$5n6@tholian.cse.psu.edu>
In article <5gdos5$pai$2@news.hkol.com>, Pao Wan <paowan@drdun.com> wrote:
>Can I use
>&ora_login("((ADDRESS=(COMMUNITY=tcp)(PROTOCOL=TCP)(HOST=foo)(PORT=1521))",
>$user_id, $password) to connect a remote database?
Sure can, but I dont think the above is valid. Did you try the above with
SQLPlus? Have you considered defining an alias for the above in tnsnames.ora?
This works for me:
$lda = ora_login("", q[scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=
foobar)(PORT=1521))(CONNECT_DATA=(SID=foobarSID)))], "") or die $ora_errstr;
Happy perl'ng,
John
groenvel@cse.psu.edu
------------------------------
Date: Sun, 16 Mar 1997 17:48:28 -0500
From: Matthew Stich <mstich@erols.com>
Subject: cgi-lib.pl
Message-Id: <332C78BB.5055@erols.com>
This is the begginning of CGI-LIB I am tyring to use:
# Parameters affecting cgi-lib behavior
# User-configurable parameters affecting file upload.
$cgi_lib'maxdata = 131072; # maximum bytes to accept via POST -
2^17
$cgi_lib'writefiles = 0; # directory to which to write files, or
# 0 if files should not be written
$cgi_lib'filepre = "cgi-lib"; # Prefix of file names, in directory
above
How do I configure this? i.e.
$cgi_lib'writefiles = ?
Do all the files in your cgi-bin have to begin with "cgi-bin"? is that
what is intended above? with:
$cgi_lib'filepre = "cgi-lib"
Thank you in advance for your help...
Matthew
------------------------------
Date: 16 Mar 1997 15:03:16 -0700
From: Nathan Torkington <gnat@elara.frii.com>
To: tchrist@perl.com
Subject: Re: Elegant way to strip spaces off the ^ and $ of a variable containing a sentence.
Message-Id: <5qn2s3cx5n.fsf@elara.frii.com>
[posted and mailed]
Tom Christiansen <tchrist@mox.perl.com> writes:
> :And why set $_ to the element of the array in stead of a copy if we
> :aren't supposed to use the side effects?
>
> Why? I can tell you that: Because it was an accident the first time, and
> people started using it, so Larry doc'ed it. As far as I'm concerned,
> it's kinda dodgy and mystifying.
Of course, this only applies to situations when you want your code to
be straightforward and easily maintained. If you're writing a
one-liner for your own use, I don't think Tom would fine you five
shekels for using map {} and discarding the return values. If you're
writing a mission critical piece of code which will have to live long
after you retire at age 35 and start a clam farm in Minnesota, you may
want to think strongly about things which may confuse the legions of
underpaid pimply youths who will be strapped into a cubicle and forced
to comprehend the dark mysteries of your code.
Of course, *aesthetics* are a different matter. If, as I suspect, Tom
doesn't like because it's just plain ugly and an oozing LISPish wound
on the otherwise virgin and unblemished cheeks of the blushing and
fair maiden we call Perl, then we're verging into taste wars. I've
been to Tom's place. You don't want to get into taste wars with Tom
:-)
Nat
------------------------------
Date: 16 Mar 1997 23:58:04 GMT
From: Ken Gaugler <keng@wco.com>
Subject: help setting documentroot expression
Message-Id: <5gi1ec$cen$1@news.wco.com>
I am trying to modify a script from one of the O'Reilly books which
has the following line:
$document_root = $ENV{'DOCUMENT_ROOT'};
I would like '$document_root' to point to a directory called 'bb' which
is just below the server's real document root. That is, as the script
evaluates the expression now, it points to '/var/web/webspace', and
I would like it to point to '/var/web/webspace/bb' instead. Can someone
show me the correct way to do this?
Thanks!
------------------------------
Date: Sun, 16 Mar 1997 17:13:18 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: help splitting a file
Message-Id: <equhg5.tl.ln@localhost>
Ken Gaugler (keng@wco.com) wrote:
: I have a large (> 1MByte) text file which I would like to
: write out to separate files, one file per page. The file
: is a book in text form, consisting of paragraphs of text,
: with each page having a page number at the bottom, and
: white space before the next page, like this:
: ....texttexttexttexttexttexttexttexttexttexttexttext
: texttexttexttexttexttexttexttexttexttext. texttexttext
: texttexttexttext. texttexttexttexttexttexttexttext
: 3
: and so on.
: Is there a smooth way in Perl to write the contents of
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: each page to a separate file, with the filename auto-
: magically generated, filenames like p1, p2 ... p245?
Yes.
: I am grateful for any hints or suggested readings
: anyone can provide.
You might want to monitor news.announce.newusers so you don't do
things that are seen as rude, like you do on the next line...
: Please reply to keng@wco.com.
^^^^^^^^
Please read the newsgroup.
-----------------------
#! /usr/bin/perl -w
$page = '';
while (<DATA>) {
$page .= $_;
if (/^\s+(\d+)$/) { # write another page worth
open(FILE, ">p$1") || die "could not open 'p$1' $!";
print FILE $page;
close(FILE);
$page = '';
}
}
__DATA__
....texttexttexttexttexttexttexttexttexttexttexttext
texttexttexttexttexttexttexttexttexttext. texttexttext
texttexttexttext. texttexttexttexttexttexttexttext
3
texttexttexttexttext. texttexttexttexttexttexttexttext
texttexttexttexttexttexttexttexttexttexttexttext...
4
-----------------------
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Sun, 16 Mar 1997 16:17:33 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Ken Gaugler <keng@wco.com>
Subject: Re: help splitting a file
Message-Id: <Pine.GSO.3.96.970316160208.2782H-100000@kelly.teleport.com>
On 16 Mar 1997, Ken Gaugler wrote:
> I have a large (> 1MByte) text file which I would like to
> write out to separate files, one file per page. The file
> is a book in text form, consisting of paragraphs of text,
> with each page having a page number at the bottom, and
> white space before the next page
> Is there a smooth way in Perl to write the contents of
> each page to a separate file, with the filename auto-
> magically generated, filenames like p1, p2 ... p245?
Sure. To get the page number, you could use something like this
BEGIN {
my $current_page = 0;
sub start_new_page {
$current_page++;
open PAGE, "> p$current_page"
or die "Can't open file for output: $!";
}
}
Now, all you need to do is to write a main program, something like this.
start_new_page; # start on the first page
$source = 'wherever you keep your file';
open IN, "< $source" or die "Can't read '$source': $!";
while (<IN>) {
if (/^\s+\d+\s*$/) { # page number, we hope
start_new_page;
} else {
print PAGE;
}
}
If you don't want it to print the blank lines before and after the page
number, you could implement a buffer for the previous few lines. Hope this
helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Sun, 16 Mar 1997 12:57:03 -0800
From: Devin Ben-Hur <dbenhur@egames.com>
To: smr@servtech.com
Subject: Re: Help w/Perl5 & Cross Platfomr Perl
Message-Id: <332C5E9F.2225@egames.com>
[mailed & posted]
Steve Rogers wrote:
> I just got a book "Cross Platform Perl" which says
> it covers Perl5. I have Windows95. It came with a
> CD and the book says the CD contains the binary version of
> Perl for Windows 95 and NT.
Hopefully you also have the Camel: "Programming Perl" by
Larry Wall, etal.
There are a lot of Perl books out there, most of them are
mediocre to terrible. The most often recommended ones are
both O'Reilly Nutshell Handbooks: Camel (above), and
Llama (Learning Perl by Randal Schwartz).
> 1. Can anyone suggest how I could get Perl5 for Win32 on my
> Win 95 system from this CD?
haven't a clue. Try emailing the author and/or publisher
directly.
> 2. Can anyone suggest how I could get Perl5 for Windows 95
> from the web?
The Win32 port is done by Activeware (formerly HIP).
They're web site is <URL:http://www.activeware.com/>.
You can find current releases and betas for newer Perl
versions on their site.
You can also find these releases at any CPAN site in the ports/
directory. <URL:http://www.perl.com/perl/CPAN/> should
redirect you to a CPAN (Comprehensive Perl Archive Network)
mirror near you. CPAN is your friend, learn to use it.
BTW, all the information in this post has been posted
before and is readily available from the FAQ or a
search of DejaNews <URL:http://www.dejanews.com/>.
HTH
--
Devin Ben-Hur <dbenhur@egames.com>
eGames.com, Inc. http://www.egames.com/
eMarketing, Inc. http://www.emarket.com/
"Sometimes you just have to step in it and see if it stinks" O-
-- Sonia Orin Lyris
------------------------------
Date: 16 Mar 1997 20:59:29 GMT
From: koenig@franz.ww.TU-Berlin.DE (Andreas Koenig)
Subject: Re: How to make perl scripts appear locally on the browser
Message-Id: <5ghmvh$6u9$1@brachio.zrz.TU-Berlin.DE>
[posted and courtesy copy sent to cited author]
In article <8c209unfcp.fsf@gadget.cscaper.com>,
Randal Schwartz <merlyn@stonehenge.com> wrote:
>
> $html =~ s/[\x00-\x20"<&>"\x80-\xff]/&\#@{[ord$&]}\;/g;
>
>Pretty robust.
Pretty irresponsible, Randal!
% perl -MBenchmark -e '
$h = join "", map { chr($_) } 0..255;
$tests = {
Randal => q{$t=$h;$t=~s/[\x00-\x20"<&>"\x80-\xff]/&\#@{[ord$&]}\;/g;$t;},
Poster => q{$t=$h;$t=~s/([\x00-\x20"<&>\x80-\xff])/"&#".ord($1).";"/ge;$t;},
};
die "ouch" if eval($tests->{Poster}) ne eval($tests->{Randal});
timethese(1000,$tests);
quote> '
Benchmark: timing 1000 iterations of Poster, Randal...
Poster: 22 secs (20.84 usr 0.08 sys = 20.92 cpu)
Randal: 48 secs (45.18 usr 0.18 sys = 45.36 cpu)
%
Please don't teach the youngins the @{} folklore too often, they tend to
believe you ;-)
andreas
------------------------------
Date: Sun, 16 Mar 1997 18:01:41 -0500
From: Hank Taylor <htaylor@mit.edu>
Subject: keys from nested data structures -- is there an easy way?
Message-Id: <332C7BD4.3486@mit.edu>
i've just begun to use perl's "complex data structures" so pardon me if
this is a silly question.
i want to get the all sets of keys from a multi-dimensional hash. here's
an example of the problem. the hash looks something like this:
$hash{$outerkey}{$innerkey}.
the set of outer keys is easy:
@outer_keys = keys %hash;
the *complete* set of inner keys is more problematic for me. the only
way that i've been able to do it is to loop over all the outer keys and
construct an array of unique keys for the keys in every sub-hash (eg.
each of the %{$hash{$outerkey}} values). here's my novice attempt at key
extraction...
----------------------------------------------------------------------------
foreach $o_key (keys %hash) {
foreach $i_key (keys %{$hash{$o_key}}) {
unless (grep(/$i_key/, @i_key)) {push(@i_key, $i_key)}
}
}
----------------------------------------------------------------------------
tell me that there's an easier way! also, what about the keys for:
$hash{$outerkey}...{$innerkey}?
please reply to htaylor@mit.edu and post to news if you think it's
worthwhile for the group to hear about this question.
thanks in advance for the help!
hank taylor
htaylor@mit.edu
------------------------------
Date: Sun, 16 Mar 1997 21:02:29 +0100
From: uzs90z@uni-bonn.de (Michael Schuerig)
Subject: Multiple substitutions
Message-Id: <19970316210229361364@rhrz-ts2-p4.rhrz.uni-bonn.de>
I'm trying to do multiple substitutions in a file without iterating over
an array of old-new pairs. I had a look at the FAQ and read the thread
in this group about matching multiple patterns, but it wasn't of much
help to me. Apparently the problem is in the eval below. Can anyone give
me an idea of what I'm doing wrong?
Michael
$mapfilename = "replace.map";
open(MAPFILE, $mapfilename) || die "Couldn't open map file: $!\n";
while (<MAPFILE>) {
($key, $value) = split /[ \t]+/, $_, 2;
chop($value);
$replacements .= "\$ln=s/$key/$value/go;";
}
close(MAPFILE);
$doReplace = eval "sub {" . $replacements . "}" || die "$!";
$ln = "xxx Old1 Old2 xxx";
&$doReplace;
print $ln;
---
Michael Schuerig Failures to use one's frontal lobes can
mailto:uzs90z@uni-bonn.de result in the loss of them.
http://www.uni-bonn.de/~uzs90z/ -William H. Calvin
------------------------------
Date: Sun, 16 Mar 1997 23:00:00 GMT
From: reinoud@xs4all.nl (Reinoud van Leeuwen)
Subject: Re: perl 5 on NT4 install help needed (badly)
Message-Id: <332d7b47.259923@news.xs4all.nl>
On 15 Mar 97 14:01:10 GMT, "recall" <recall@easinet.co.uk> wrote:
>Does anyone out the know how to install perl 5 on NT4 - I've tried twice
>now and everything seems OK until you try and run a script - running it
>locally is fine but via HTTP I get HTTP1.0/501 Not Supported error - can
>somebody please tell me or point me to someone who can tell me how to
>install this damned thing
Does the account under which the HTTP server runs have sufficient
rights to all perl files?
__________________________________________________
Reinoud van Leeuwen reinoud@xs4all.nl
http://www.xs4all.nl/~reinoud
I specifically DO NOT give anyone permission to use my email adress
for any commercial or non commercial mailings. I will bill everyone
who sends me this kind of mail for wasting my time. Under Dutch law,
people who don't let me know they disagree with such a bill are obliged
to pay it.
------------------------------
Date: 16 Mar 1997 16:04:53 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Perl frontend for MS Access
Message-Id: <5ghn9l$spg@panix.com>
In <332C4300.B5B@best.com> Mark Peaslee <mpeaslee@best.com> writes:
>Subject: Perl frontend for MSAccess
>I'm new to PERL and have been given the task of creating a frontend for
>a MS Access database. My thought is that this has already been done by
>others and thought I would check and see if I could get some advice.
>Does, anyone know if there is a program in perl already written for this
>and if not, any advice on how I should go about creating one??? Any and
>all advice is very welcomed.
Looks like a job for the Win32::ODBC module -- Check Dave Roth's most
excellent Web site at: http://www.roth.net/odbc/
[ mailed and posted ]
--
Clay Irving See the happy moron,
clay@panix.com He doesn't give a damn,
http://www.panix.com/~clay I wish I were a moron,
My God! Perhaps I am!
------------------------------
Date: Sun, 16 Mar 1997 12:52:40 -0800
From: Odin <chuckr@ptw.com>
Subject: PERLDatabase broken!Need help!
Message-Id: <332C5D97.15F1@ptw.com>
<HTML><BODY>
Howdy,
<BR>
<BR>I'm tring to modify a script myself to kind of jazz up my web pages. And
make it easier for me to keep them updated. I've edited a script
I have from Jason Berry, and it's only particially working. I'm trying
to get the script to print a range of information from a database. My loop
will count up from the range I want it to, and print out the number of
the loop it's in (I was testing if it worked.) But the database information
is not printing inside the range as I want it to. It will print 10 lines,
not I can't get it to print lines 10 - 20, like I'm asking it.
<BR>
<BR>Eventually, I would like the be able to call the script with a numerical
range (such as .../cgi-bin/my_file.cgi?100-125) But I'm taking it one step
at a time. (and I don't know how to get it to read anyway!) This is why
I'm calling the script with ?two after it. That will set the value of the
range, then set the minimum and maximum of the counter loop.
<BR>
<BR>So, what I'm wondering is if there is a better way to do this? How do I
get my program to read from a database, find the information with-in the
required range, put that information into an array, then print it out.
<BR>
<BR>I would also like to have the header file changed so that it would fit
the range that it's with-in. I.E. I want the lines 1-25 to be the first
page, 26-50 to be the second page... and have the header file change along
with it, so you can move forward and back through the pages.
<BR>
<BR>See, the database is getting huge. Over 560 lines are in it. or more then
22 pages so far. And when printed as HTML, it can get so large (as one
huge html file) that it will crash Netscape. That's why I'm trying to turn
to printing out ranges.
<BR>
<BR>I know I can just make smaller databases and multiple CGI scripts, but
that is time consuming. Even if done with a macro. But I'm going for ease
here... I'm not tring to add more work!
<BR>
<BR>Any tips/suggestions would be great!
<BR>This script is at <A HREF="http://www.ptw.com/~chuckr/worlds/vote/new_001.cgi">http://www.ptw.com/~chuckr/worlds/vote/new_001.cgi</A> if
you want to test it out. (If there's a security problem, <I>PLEASE let
me know!</I>) A sample of the database is also attatched.... Thanks.
<BR>
<BR>#!/usr/bin/perl
<BR>##########################################################
<BR># Poll It! version 1.0
#
<BR># by Jason Berry
#
<BR># Copyright 1996 Jason Berry
#
<BR># jason@33online.com
#
<BR># <A HREF="http://www.33online.com/scripts/">http://www.33online.com/scripts/</A>
#
<BR>##########################################################
<BR># If you're using this please let me know, if you edit this script in
#
<BR># any way, please let me know. You may have a good idea. Any comments #
<BR># or ideas are accepted! Donations always excepted :)
#
<BR>##########################################################
<BR># SCRIPT NOTICE
#
<BR># Copyright 1996 Jason Berry - All Rights Reserved.
#
<BR>#
#
<BR># Poll It! may be used and modified by anyone. As long
#
<BR># as this copyright notice, and the comments above are present. By
#
<BR># using Poll It! you agree that the author is not libel for any
#
<BR># possible problems resulting from its use.
#
<BR>#
#
<BR># Making money by selling this code is not allowed without clearing
#
<BR># it with the author. Please ask first!
#
<BR>#########################################################
<BR># Define Variables #
<BR>
<BR>$location = "<A HREF="http://www.ptw.com/~chuckr/worlds/vote/new_001.cgi">http://www.ptw.com/~chuckr/worlds/vote/new_001.cgi</A>";
<BR>$pollfile = "/home/chuckr/public_html/worlds/vote/poll.dta";
<BR>$headerfile = "/home/chuckr/public_html/worlds/vote/head_001.dta";
<BR>#########################################################################
<BR># Internal Variables #
<BR>
<BR>$bg_file = "o023.jpg";
<BR>$bgcolor = "white";
<BR>$textcolor = "black";
<BR>$linkcolor = "blue";
<BR>$submit_text = "This is my favotie Avatar!";
<BR>#################
<BR># Start Script
<BR>
<BR>if(! $ENV{'QUERY_STRING'}) {
<BR> $range_min = 1;
<BR> $range_max = 10;
<BR> &get_votes;
<BR> &main;
<BR>}
<BR>
<BR>if($ENV{'QUERY_STRING'} eq "results") {
<BR> &parse_form;
<BR> &get_variables;
<BR> &get_votes;
<BR> &results;
<BR>}
<BR>
<BR>if($ENV{'QUERY_STRING'} eq "two") {
<BR> $range_min = 11;
<BR> $range_max = 20;
<BR> &get_votes;
<BR> &main;
<BR>}
<BR>
<BR>else {
<BR> &parse_form;
<BR> &get_variables;
<BR> &get_votes;
<BR>}
<BR>#######################
<BR># Parse Form Subroutine
<BR>
<BR>sub parse_form {
<BR>
<BR># Get the input
<BR> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
<BR> @pairs = split(/&/, $buffer);
<BR>
<BR> foreach $pair (@pairs) {
<BR> ($name, $value) = split(/=/, $pair);
<BR>
<BR> # Un-Webify plus signs and %-encoding
<BR> $value =~ tr/+/ /;
<BR> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
<BR> $value =~ s/<!--(.|\n)*-->//g;
<BR> $value =~ s/<([^>]|\n)*>//g;
<BR> $FORM{$name} = $value;
<BR> }
<BR>}
<BR>##################
<BR># Get Variables
<BR>
<BR>sub get_variables {
<BR>
<BR> if ($FORM{'ip'}) {
<BR> $ip = $FORM{'ip'};
<BR> }
<BR>
<BR> if ($FORM{'poll'}) {
<BR> $poll = $FORM{'poll'};
<BR> }
<BR>
<BR> if ($FORM{'vote'}) {
<BR> $vote = $FORM{'vote'};
<BR> }
<BR>
<BR> if ($FORM{'player'}) {
<BR> $player = $FORM{'player'};
<BR> }
<BR>}
<BR>############################
<BR># Get Data Number Subroutine
<BR>
<BR>sub get_number {
<BR>
<BR> open(NUMBER,"$pollfile");
<BR> @mvps = <NUMBER>;
<BR> close(NUMBER);
<BR> $mvpcount = @mvps;
<BR> $count = 0;
<BR>
<BR> while($count < $mvpcount) {
<BR> ($player,$filename,$location,$erics,$catagory,$subcatagory,$sides,$rotation,$clarity,$detail,$size,$votes,$overall,$comment)
= split(/::/,$mvps[$count]);
<BR> if($player eq "$poll") {
<BR> $votes++;
<BR> $mvps[$count] = "$player\::$filename\::$location\::$erics\::$catagory\::$subcatagory\::$sides\::$rotation\::$clarity\::$detail\::$size\::$votes\::$overall\::$comment\::\n";
<BR> }
<BR> $count++;
<BR>
<BR> }
<BR> open(NUMBER,">$pollfile");
<BR> foreach$mvp(@mvps) {
<BR> print NUMBER "$mvp";
<BR> }
<BR> close(NUMBER);
<BR>}
<BR>##############
<BR># Main
<BR>
<BR>sub main {
<BR> &display;
<BR>}
<BR>##############
<BR># Display
<BR>
<BR>sub display {
<BR>
<BR>
<BR> open(NUMBERS,"$pollfile");
<BR> @mvps = <NUMBERS>;
<BR> close(NUMBERS);
<BR> print "Content-type: text/html\n\n";
<BR> print "<html><body background=\"$bg_file\"
bgcolor=\"$bgcolor\" text=\"$textcolor\" link=\"$linkcolor\"
vlink=\"$linkcolor\">\n";
<BR> open(HEADER,"$headerfile");
<BR> @headers = <HEADER>;
<BR> close(HEADER);
<BR> foreach$header(@headers) {
<BR> ($header1,$header2,$header3) = split(/::/,$header);
<BR> print "<B>$header1 | <A HREF=\"../worlds/backgrnd.htm\">The
Grade Book</A> | $header2 <-- Back|Next --> $header3 </B>\n";
<BR> }
<BR> print "<CENTER><TABLE WIDTH=100% BORDER=4>\n";
<BR> print "<Form method=\"post\" action=\"$ENV{'SCRIPT_NAME'}?results\">\n";
<BR>
<BR> $i=0;
<BR> while ( $i <= $range_min ) {
<BR> $i++;
<BR> while ( $i >= $range_min && $i <= $range_max ) {
<BR> for$mvp(@mvps) {
<BR> ($player,$filename,$location,$erics,$catagory,$subcatagory,$sides,$rotation,$clarity,$detail,$size,$votes,$overall,$comment,)
= split(/::/,$mvp);
<BR>
<BR> print "$i ";
<BR> print "<TR><TD WIDTH=84><A HREF=\"../avatars/$location.htm\">$player</A></TD>\n";
<BR> print "<TD WIDTH=16><INPUT Type=Radio
name=\"poll\" value=\"$player\"></TD>\n";
<BR> print "<TD WIDTH=12><A HREF=\"<A HREF="http://www.preferred.com/~eschuler/avatars/public/$filename.zip\">http://www.preferred.com/~eschuler/avatars/public/$filename.zip\</A>">$erics</A></TD>\n";
<BR> print "<TD WIDTH=48>$catagory</TD>\n";
<BR> print "<TD WIDTH=64>$subcatagory</TD>\n";
<BR> print "<TD WIDTH=16 BGCOLOR=#0080FF>$sides</TD>\n";
<BR> print "<TD WIDTH=16 BGCOLOR=#0080FF>$rotation</TD>\n";
<BR> print "<TD WIDTH=16 BGCOLOR=#A4C8F0>$clarity</TD>\n";
<BR> print "<TD WIDTH=16 BGCOLOR=#A4C8F0>$detail</TD>\n";
<BR> print "<TD WIDTH=16>$size</TD>\n";
<BR> print "<TD WIDTH=32 BGCOLOR=#FFFBF0>$votes</TD>\n";
<BR> print "<TD WIDTH=16 BGCOLOR=#FFFBF0>$overall</TD>\n";
<BR> print "<TD WIDTH=120>$comment</TD></TR>\n";
<BR> last if $i==$range_max;
<BR> $i++;
<BR> }
<BR> last if $i==$range_max;
<BR> }
<BR> }
<BR>
<BR>
<BR> print "</TABLE>\n";
<BR> print "$max";
<BR> print "<input type=submit name=submit value=\"$submit_text\">\n";
<BR> print "Total Vote Count for this page is: $votecount\n";
<BR> print "</FORM></CENTER>\n";
<BR> print "<B>Poll It! Version 1.0</B> Created by <B><I><FONT
SIZE=+1><A HREF=\"<A HREF="http://www.interdreams.com/scripts/\">http://www.interdreams.com/scripts/\</A>">Jason
Berry</A></FONT></I></B>.<BR>\n";
<BR> print "And extensivly modified for the Avatar Grade Book by
<B><I><FONT SIZE=+1 COLOR=#8000FF>Odin</FONT></I></B>.</BODY></HTML>\n";
<BR>}
<BR>
<BR>####################
<BR># Admin View Display
<BR>####################
<BR>sub short_display {
<BR> &get_number;
<BR> &get_votes;
<BR> open(NUMBERS,"$pollfile");
<BR> @mvps = <NUMBERS>;
<BR> close(NUMBERS);
<BR> print "<table Cellpadding=9 border=1><Form method=\"post\"
action=\"$ENV{'SCRIPT_NAME'}\">\n";
<BR> foreach$mvp(@mvps) {
<BR> ($player,$filename,$location,$erics,$catagory,$subcatagory,$sides,$rotation,$clarity,$detail,$size,$votes,$overall,$comment)
= split(/::/,$mvp);
<BR> print "<tr><td><b><h3><TT>$player</td><td><center><h3><TT>$votes
Out Of [ $votecount ]</td></tr>\n";
<BR> }
<BR> print "</form></table></body></html>\n";
<BR>}
<BR>###########################
<BR># Get Total Number of Votes
<BR>
<BR>sub get_votes {
<BR>
<BR> $votecount = 0;
<BR> open(NUMBERS,"$pollfile");
<BR> @mvps = <NUMBERS>;
<BR> close(NUMBERS);
<BR> foreach$mvp(@mvps) {
<BR> ($player,$filename,$location,$erics,$catagory,$subcatagory,$sides,$rotation,$clarity,$detail,$size,$votes,$overall,$comment)
= split(/::/,$mvp);
<BR> $votecount = $votecount + $votes ;
<BR> }
<BR>}
<BR>################
<BR># Results Page
<BR>
<BR>sub results {
<BR>
<BR> print "Content-type: text/html\n\n";
<BR> print "<HTML><BODY BACKGROUND=\"$bg_file\"
BGCOLOR=\"$bgcolor\" TEXT=\"$textcolor\" LINK=\"$linkcolor\"
VLINK=\"$linkcolor\"><CENTER>\n";
<BR> print "<P><H2><TT> Your vote for <I><FONT
COLOR=#8000FF>$poll</FONT></I> was recorded.</TT></H3>\n";
<BR> print "<TABLE BORDER=6><TR><TD ALIGN=center><B><A
HREF=\"$location\">Click here to see the Avatar Table.</A></B></TD></TR></TABLE>\n";
<BR> print "<HEAD><P><FONT COLOR=#0000FF>(<A
HREF=\"<A HREF="javascript:history.go(-1">javascript:history.go(-1</A>)\" TARGET=\"righty\">
BACK </A>)</FONT></P></HEAD>\n";
<BR> &short_display;
<BR> print "</CENTER></BODY></HTML>";
<BR>}
<BR>#######################
<BR># Create Poll File
<BR>sub make_lastpoll {
<BR> open(POLL,"$pollfile");
<BR> @poll = <POLL>;
<BR> close(POLL);
<BR>}
<BR>########################
<BR># Whew! Now that was fun
<BR>#end of new_001.cgi program
<BR>
<BR>######################################
<BR>#This is the top of the database sample "poll.dta"
<BR>
<BR>1701D::1701d::1701d::E::Public::Drawing::8::8::7::8::6::0::8::StarTrek::
<BR>1WF::1wf::1wf::E::Public::Photograph::6::0::5::3::10::0::4::FunnyEyes::
<BR>2WF::2wf::2wf::E::Public::Photograph::5::0::5::3::10::0::4::FunnyMouth::
<BR>3D::3d::3d::E::Public::Drawing::8::8::6::7::10::0::7::Cherio::
<BR>3DHomer::3dhomer::3dhomer::E::Public::Drawing::1::0::6::6::9::0::6::HomerSim.::
<BR>4Flow::4flow::4flow::E::Public::Drawing::4::2::2::3::10::0::2::MahjjongTile::
<BR>60SGirl::60sgirl::60sgirl::E::Public::Photograph::1::0::4::2::10::0::3::60'sGirl::
<BR>8Legs::8legs::8legs::E::Public::Drawing::8::7::7::6::10::0::2::Octopus::
<BR>AARDdog::aarddog::aarddog::E::WCG::Drawing::8::8::8::7::10::0::8::Robo-Dog::
<BR>ABath::abath::abath::E::Public::Photograph::1::0::5::6::10::0::4::Waves&Suit::
<BR>AF_Robo1::af_robo1::af_robo1::E::Public::Drawing::8::7::6::7::10::0::6::Robot::
<BR>AIS::ais::ais::E::Public::Photograph::NR::NR::NR::NR::NR::0::NR::NR::
<BR>AL001::al001::al001::E::Public::Drawing::4::5::6::6::10::0::5::Skelator::
<BR>Alice::alice::alice::E::WCG::Drawing::2::4::5::5::10::0::6::..inWndrLnd::
<BR>AlienK::alienk::alienk::E::Public::Drawing::8::5::6::1::10::0::1::UglyAlien::
<BR>Allen::allen::allen::E::WCG::Photograph::8::9::5::8::10::0::8::SuitMan::
<BR>AMGothc::amgothc::amgothc::E::Public::Photograph::3::0::6::6::10::0::1::TVShow::
<BR>Amy::amy::amy::E::WCG::Photograph::5::5::4::5::10::0::5::YoungGirl::
<BR>ANC::anc::nr::E::Naughty::Photograph::1::0::5::2::10::0::1::AnnaN.S.::
<BR>Andy::andy::andy::E::Public::Photograph::8::4::7::6::6::0::6::B&WMan::
<BR>Anim::anim::anim::E::WCG::Drawing::4::5::7::7::10::0::7::BootsChick::
<BR>Ankles::ankles::nr::E::Naughty::Photograph::1::0::7::6::10::0::2::SickBend::
<BR>Annie::annie::annie::E::WCG::Drawing::4::7::7::6::10::0::7::SmokerChick::
<BR>ANS::ans::nr::E::Naughty::Photograph::4::0::7::7::10::0::0::4MoreAnna's::
<BR>Antoine::antoine::antoine::E::Public::Photograph::6::7::6::6::10::0::7::NiceMaleAv::
<BR>Ape::ape::ape::E::Public::Drawing::8::8::6::7::10::0::7::GreatRobot::
<BR>Ape1::ape1::ape1::E::Public::Drawing::8::9::6::3::10::0::4::UglyMonkey::
<BR>Arie::arie::arie::E::Public::Drawing::4::3::7::8::10::0::5::PigRider::
<BR>Arnold::arnold::arnold::E::Public::Drawing::5::1::1::1::10::0::4::VeryPoorAv::
<BR>AsianX::asianx::nr::E::Naughty::Photograph::8::0::3::1::10::0::4::LowQuality::
<BR>
</BODY>
</HTML>
------------------------------
Date: Mon, 17 Mar 1997 01:31:59 GMT
From: revjack@radix.net (revjack@radix.net)
Subject: Re: PERLDatabase broken!Need help!
Message-Id: <332f9ef8.1923143@news1.radix.net>
Keywords: Hexapodia as the key insight
Previously, Odin at Pacific Bell Internet Services wrote:
: <HTML><BODY>
Dear God.
_________________
revjack@radix.net
------------------------------
Date: 16 Mar 1997 19:22:32 GMT
From: "Jeff Oien" <jeffo@execpc.com>
Subject: PerlShop Questions
Message-Id: <01bc3240$51266de0$7306cfa9@Pjeffo.execpc.com>
I have some questions now and will have more in the
near future I'm sure.
My demo is at:
http://www.chibizdir.com/MyStore/demo.html
1. If I would like only one catalog page or if I would
like 4 catalog pages, how would I go about doing
that? (The demo has 3.)
2. The form results don't show the "Where did you hear
about our site?" and "Suggestions" even though I filled
them out. Any idea why?
3. I'm using the built in Socket for sending the form.
When I get the form results, the return address is
shown as www.chibizdir.com. I can't nail down where
the variable is on the script. Also, for $smtp_addr
do I put in the smtp for the order receiver (for lack of
a better term) or the smtp for the server that's hosting
the site?
Thanks for any help. I'll have more questions soon.
--
Jeff Oien, WebDesigns
http://www.execpc.com/webdesigns/
jeffo@execpc.com
------------------------------
Date: 16 Mar 1997 21:14:35 GMT
From: Dave Bushong <NOJUNKMAILbushong@bigger.com>
Subject: Re: Q: Good Perl Book
Message-Id: <5ghnrr$mdd@dfw-ixnews10.ix.netcom.com>
In article <5fuul5$6l7@reader1.news.act.net>,
Paul B. Brown <pbrown@btc.btechnet.com> wrote:
>In article <331D39E2.2976@usa.net>,
> Sigge Eriksson <sigge.eriksson@usa.net> writes:
>>Anyone know a good book for a Perl beginner?
>>
>> / Sigge Eriksson
>
>Learning Perl by Randal L. Schwartz - A beginner's tutorial. Excellent
>for the basics.
>
>Programming Perl by Larry Wall, Tom Christiansen, and Randal L. Schwartz -
>In depth into Perl and how it is used. Excellent for advanced topics and
>as a reference.
>
I taught myself C in 1982 from K&R. The text was concise, accurate,
and dependable. Plus a little humor. Not bad for a seven-dollar
book.
I tried to teach myself Perl in '96 with PP from W&C&S, but there are
so many inane and distracting footnotes, inside jokes, "sort of"
comments, and geek humor, that I would have to recommend it as a
reference, but not as a learning resource.
Maybe I should propose my own version of the 1997 Perl contest:
Write a regexp that filters out geek humor and keeps the good
stuff, such that you can pipe the entire text of "Programming
Perl" through it, and end up with something as useful as the
classic K&R text (maybe even as small).
Disqualification: if any of these expressions appear in the
output, you are disqualified:
sort of
kind of
or not
trust us
Gee
Actually, I'm lying
this is the last time we'll mention it
Dave
--
Dave Bushong
bushong at bigger dot com
------------------------------
Date: Mon, 17 Mar 1997 00:31:12 GMT
From: kanner@pacificnet.net (Anthony Kanner)
Subject: Secret but cool web site
Message-Id: <332c9079.23630823@news.pacificnet.net>
I have built a nice programming web site but it is DEAD. I have tried
putting it on the search engines but it hasn't worked. Anyway please
visit it at http://www.pacificnet.net/~kanner/
Thanks,
Anthony
------------------------------
Date: Sun, 16 Mar 1997 16:00:22 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Alan Hathcock <bigal1@ix.netcom.com>
Subject: Re: Server won't run Perl scripts
Message-Id: <Pine.GSO.3.96.970316155926.2782G-100000@kelly.teleport.com>
On 16 Mar 1997, Alan Hathcock wrote:
> Subject: Server won't run Perl scripts
Sounds like a server problem, not a perl problem. Have you checked your
server's manual? Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Sun, 16 Mar 1997 11:55:41 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: system calls
Message-Id: <t6chg5.0h1.ln@localhost>
Tim Gim Yee (tgy@chocobo.org) wrote:
: On Sun, 16 Mar 1997 14:01:11 GMT, Triantafyllos Marakis
: <ceetm@cee.hw.ac.uk> wrote:
: >I am using a system call :
: >system "/bin/grep -c -i '$string' file";
: >
: >I've tryed to assign the return value to a variable but this
: >does not work.
: $count = `/bin/grep -c -i '$string' file`;
: Backticks will capture the the output of your command. But why even
: make a system call? Count the number of lines which match $string,
: case insensitive, right?
: open FILE, $file or die "Couldn't open $file: $!";
: @lines = grep {/$string/i} <FILE>;
: $count = @lines;
: close FILE;
: Sure, it's more typing, but it's also more portable.
^^^^^^^^^^^^^^^^
It can be made to be less more typing ;-)
You don't need the @lines intermediate array:
open FILE, $file or die "Couldn't open $file: $!";
$count = grep {/$string/i} <FILE>;
close FILE;
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Sun, 16 Mar 1997 19:08:07 -0500
From: Pagay Vinay Vijay Mr <vanguard@ee.mcgill.ca>
Subject: System V IPC
Message-Id: <332C8B67.41C67EA6@ee.mcgill.ca>
How do I use the ftok() system call in Perl?
I am working with semaphores, shared memory and message queues.
Thanks.
Vinay Pagay
------------------------------------------------------------------------3525
Durocher St. Apt.#96 Internet: vanguard@ee.mcgill.ca
Montreal, PQ, vpagay@po-box.mcgill.ca
CANADA. H2X 2E7. vpagay@hotmail.com
Tel: (514) 848-8967 Web: http://www.ee.mcgill.ca/~vanguard
------------------------------------------------------------------------
------------------------------
Date: 16 Mar 1997 21:07:41 GMT
From: "Petri Bdckstrvm" <...petri.backstrom@icl.fi>
Subject: Re: The difference between GET and POST methods w/Perl
Message-Id: <01bc324d$74644450$665e40c1@ghoti>
keiper <keiper@science.duq.edu> wrote in article
<01bc322f$898333a0$d188bea5@jer>...
> I have developed a Perl script to take a line like element_name=Li from
> STDIN (the way a HTML form submits via the POST method) and open a page
> with that element's name, etc. One problem is that I would prefer to
send
> this data via JavaScript using the get format (ie.
> elementwin.cgi?element_name=Li). Is there a standard script available
for
> parsing the input from the GET method, or am I getting into trouble here?
Yes; the excellent CGI.pm module handles this for you automagically (well,
almost ;-). With CGI.pm you can use GET or POST or test your script on the
command line with very little effort.
Once you've looked at CGI.pm, you'll regret the time you've spent doing
(or trying to do, depending on the person ;-) it yourself.
See http://www.perl.com/CPAN (Comprehensive Perl Archive Network)
for details.
regards,
...petri.backstrom@icl.fi
ICL Data Oy
Finland
------------------------------
Date: Sun, 16 Mar 1997 12:19:36 -0800
From: Mark Miller <M.P.Miller@worldnet.att.net>
Subject: Unix vs WIN95 equivalents
Message-Id: <332C55D8.5CAC@worldnet.att.net>
I am using the llama book and am having difficulty finding any kind of documentation
explaining equivalent keystrokes between Unix and WIN95. As an example, on page 65, it
explains how to end a manually entered array: press "Control-D" and then the script
will continue. This combination does not work in WIN95. Instead, I've had to use the
following:
---------------------
print "Enter a number between 0 and 2: ";
$nom = (<STDIN>);
chop($nom);
# This section replaces the "Control-D"
print "Enter a list of strings: \n";
while (<>) { # read lines from STDIN
chop; # remove the newline characters
last unless $_; # blank line terminates entry
push @ary, "$_\n"; # add line to array, replacing the stripped newline
}
print @ary[$nom];
-----------------------
I have searched through numerous FAQ's. Can anyone point me to a page of
equivalents? Thanks.
Mark
------------------------------
Date: Sun, 16 Mar 1997 17:42:41 GMT
From: slacker@dixonillinois.com
Subject: Re: What's a good Perl book?
Message-Id: <332c2aff.1827918@news.essex1.com>
On 12 Mar 1997 22:57:46 GMT, dtong@lynx.dac.neu.edu (David Tong)
wrote:
>Hello,
>
>Thanks to everyone who replied with their references. It was clear that
>the O'Reiley books are the choices. I will also get the "Cross-platform Perl"
>by Eric Johnson since I will work on multiple platforms. I am sure I will
>come back here for more help from the kind and helpful people like you.
>
> Thank You
> David
Here's a real newbie answer, from a guy that came straight out of
Dos/Win with no prior programming experience.
Find a good book on UNIX.
Every Perl book I've seen (including the camel and llamma books) take
for granted you've mastered UNIX. A good part of the explanations go
like this, "The ? works just like the UNIX ? function." with a little
non-unix explanation following.
A decent Unix book for beginners is UNIX Made Easy by Muster, ISBN
0-07-882173-8
Then the llamma book although the first chapter is a doosy until you
figure out what it's referring to in the later chapters.
This of course does not apply to all the people who already know UNIX
but if you are coming from a different platform you'll go a lot
farther a lot faster with the UNIX book just there for the reference.
Greg McKean
Just another Slacker
slacker@dixonillinois.com
------------------------------
Date: Sun, 16 Mar 1997 23:22:54 GMT
From: mikelon@netaccess.co.nz (Mike Long)
Subject: Re: What's wrong with "an email" (was: How to spam - legitimately)
Message-Id: <332d7fb8.50463708@202.37.101.7>
Some news readers (like Agent) have spell-checkers (UK and US) to
catch "hussey" but I'm afraid even Agent won't catch:
>I an neither
How about a touch-typing course? :-)
Mike Long
mikelong@netaccess.co.nz
====================================
"...but I digress." - Ronnie Corbett
------------------------------
Date: 16 Mar 1997 19:08:10 -0500
From: rnewman@shell1.cybercom.net (Ron Newman)
Subject: Re: Why doesn't flock() work properly on Solaris?
Message-Id: <5gi21a$6r6@shell1.cybercom.net>
In article <pz3etx40ri.fsf@eeyore.ibcinc.com>,
Roderick Schertler <roderick@argon.org> wrote:
>I don't have a Solaris system to check, but I'd bet the flock() the C
>program is getting comes from the BSD compatibility library.
Yes, I think you're right.
> Perl doesn't use this emulation because it doesn't use any functions from
>that library (because they are broken in various major ways).
I've never heard of any bugs in the BSD compatiblity library -- what
kind of bugs are you referring to?
--
Ron Newman rnewman@cybercom.net
Web: http://www.cybercom.net/~rnewman/home.html
------------------------------
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 128
*************************************