[6497] in Perl-Users-Digest
Perl-Users Digest, Issue: 122 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 15 09:07:11 1997
Date: Sat, 15 Mar 97 06:00:39 -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 Sat, 15 Mar 1997 Volume: 8 Number: 122
Today's topics:
Re: [HELP] !@#$% sort subroutines... <rootbeer@teleport.com>
Re: can i pass a filehandle through a socket? (Jason C Austin)
Can use SQL/NET v2 connect string in Perl module? (Pao Wan)
Re: Efficient multiple regexp searching (Mark J Hewitt)
Re: flock() problem khawkins@ncsa.uiuc.edu
Re: How to spam - legitimately (Douglas McClure)
Just a Test! (Brian Howell)
Re: Knowing the pid of a fork()'ed child, really (Jason C Austin)
Re: learning perl (Clay Irving)
Re: multi-line mode and m//m (Jeffrey)
Re: Perl and ypcat <rootbeer@teleport.com>
PERL on Windows NT <mcmanus@ait.fredonia.edu>
Re: PERL Programmer needed <gsievers@gsievers.xnet.com>
Re: Perl Question (Jon Bell)
Q: File renaming and locking <jase@shocknet.demon.co.uk>
running perl/cgi scripts on Win95 m/c narendran@hotmail.com
Re: sort large array <rootbeer@teleport.com>
Sorting help (Niksun)
Re: Sorting help (Tim Gim Yee)
Re: Sorting help <rruiz@cybercities.com>
Re: sourcing (bash) config files within perl (Abigail)
What is the limitation to use DBD::Oracle module? (Pao Wan)
Re: What's wrong with "an email" (was: How to spam - le (Stuart Leichter)
Re: What's wrong with "an email" (was: How to spam - le <philip@weather.demon.co.uk>
Re: What's wrong with "an email" (was: How to spam - le (Ross Howard)
Why doesn't flock() work properly on Solaris? (Ron Newman)
Win32: Building pll's from BC++? (Chen-Ming Lee)
Re: year 2000 question (Abigail)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 14 Mar 1997 19:48:28 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: mblase@ncsa.uiuc.edu
Subject: Re: [HELP] !@#$% sort subroutines...
Message-Id: <Pine.GSO.3.95q.970314192555.11801F-100000@linda.teleport.com>
On Fri, 14 Mar 1997 mblase@ncsa.uiuc.edu wrote:
> I know I have the syntax right, because the thing runs. It even runs
> in the debugger. The only thing it doesn't do is sort the array
> it's given. Could some kind soul glance through this and tell me
> what I'm doing wrong?
> sub AlphaSort {
> local(@array) = @_;
> return sort Alphabetical @array; # return the sorted array
> }
You're trying too hard. :-)
> 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'
> }
> return $a cmp $b;
> }
You're trying WAY too hard. :-)
You don't need (and don't want) to localize the magical $a and $b
variables in your sort routine. And you sure don't want to change them,
since they're aliased to the original elements!
You could do this... (but don't!)
sub Alphabetical {
my $A = $a;
my $B = $b;
for ($A, $B) {
$_ = lc $_;
s/^\s+//; # Strip leading whitespace
s/^the\s+//; # Strip leading "the "
s/^an?\s+//; # Strip leading "a " or "an "
}
$A cmp $B
}
The reason you shouldn't is that this algorithm has to pretty up every $a
and every $b passed to it, again and again for each time you compare a
pair. Not a problem if you sort only 10 items, but when you get past 100,
or 1000 it starts to get way too slow. Instead, just prettify each item
once, like this.
sub Alpha_sort {
my @pretty = @_; # The prettyed-up version of each entry
for (@pretty) {
$_ = lc $_;
s/^\s+//; # Strip leading whitespace
s/^the\s+//; # Strip leading "the "
s/^an?\s+//; # Strip leading "a " or "an "
}
@_[ sort { $pretty[$a] cmp $pretty[$b] } 0..$#_ ];
}
Okay, maybe the last line needs some explanation. :-)
Start with '0..$#_'. That's a list of the indices of the @_ array.
(That's what we're really sorting here: just the indices. At the end,
we'll turn that list back into a list of elements.) The sort algorithm is
simple: The indices go in the order that the corresponding members of
@pretty sort in. That's the stuff in the '{ }'. Now, if you're following
along, we have a list of indices sorted in the order we want. So, we use
those to index into @_ , our original parameter list, as an array slice.
Since that's the last item evaluated, it's also the sub's return value.
Bang! It's a sorted list.
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: 12 Mar 1997 20:26:39 GMT
From: jason@wisteria.cs.odu.edu (Jason C Austin)
Subject: Re: can i pass a filehandle through a socket?
Message-Id: <JASON.97Mar12152639@wisteria.cs.odu.edu>
In article <slrn5iavrp.llo.felix@chance.em> felix@chance.em (felix k sheng) writes:
=> i was just wondering if it's possible in perl5 to pass a filehandle,
=> (in particular a filehandle that has been used by accept to attach to
=> an incoming connection) - over another filehandle to a waiting process.
=>
=> i.e. if i wanted to create a server that upon startup shoots out 5
=> or so kids which then do nothing. the server sits on a port recieves
=> connect requests and hands them off to her waiting children.
=>
=> is something like that possible? thanks for any info/pointers.
You need to use the I_SENDFD streamio ioctl() function on the
server end and the I_RECVFD function on the client end. No idea if
this is accessible through perl, but if you really need the
performance of pre-forked children, perl is probably the wrong thing
to use anyway. Check the streamio man page for more information.
--
Jason C. Austin
austin@visi.net
------------------------------
Date: Sat, 15 Mar 1997 09:05:40 GMT
From: paowan@drdun.com (Pao Wan)
Subject: Can use SQL/NET v2 connect string in Perl module?
Message-Id: <5gdos5$pai$2@news.hkol.com>
Can I use
&ora_login("((ADDRESS=(COMMUNITY=tcp)(PROTOCOL=TCP)(HOST=foo)(PORT=1521))",
$user_id, $password) to connect a remote database?
If the answer is no, then how can I connect a remote database which listen on
port xxxx?
------------------------------
Date: Sat, 15 Mar 1997 11:28:10 GMT
From: mjh@elsabio.demon.co.uk (Mark J Hewitt)
Subject: Re: Efficient multiple regexp searching
Message-Id: <332a8448.4014151@news.demon.co.uk>
Tad McClellan posted 27 lines in <9ov8g5.ro.ln@localhost> that included:
>Which, by the way, is from the new perl FAQ (part 6).
>
>Get the new FAQs at a newsgroup near you!
Which was not available when I posted my message - and now I've seen it, it
is significantly better than its predecessor. But, I can't find it on a
CPAN site for ftp (as text/pod/html/stone tablets/papyrus). Will it appear
there, or is this still a preliminary FAQ?
--
Mark J. Hewitt at home mjh@elsabio.demon.co.uk
------------------------------
Date: Sat, 15 Mar 1997 01:21:11 -0600
From: khawkins@ncsa.uiuc.edu
Subject: Re: flock() problem
Message-Id: <858410335.23626@dejanews.com>
In article <Pine.GSO.3.96.970314083524.15346I-100000@kelly.teleport.com>,
Tom Phoenix <rootbeer@teleport.com> wrote:
>
> On Fri, 14 Mar 1997, Lutz Albers wrote:
>
> > Wait a minute. Do I understand this correct: perl isn't flushing the
> > file buffer before it releases the lock ? Then I would call this a mayor
> > bug :-)
>
> Yes, if you ask perl to release the lock before you force it to flush the
> buffers, then you have caused a major bug. But whose fault is that? :-)
Umm...actually, from the flock definition and example in the Camel book
(pp. 166 - 167, turqoise), I'd say that it's probably not me at fault. ;-)
This is yet another place where this information should probably be
changed, or caveated, or something.
Oh, and chalk up another "me too" for broken flock code that's now fixed.
:) :)
> -- Tom Phoenix http://www.teleport.com/~rootbeer/
> rootbeer@teleport.com PGP Skribu al mi per Esperanto!
> Randal Schwartz Case: http://www.lightlink.com/fors/
--
=) Kevin Hawkins -- Senior in Computer Science, University of Illinois
(= NCSA Technology Management | e-mail to: khawkins@ncsa.uiuc.edu
=) http://gto.ncsa.uiuc.edu/khawkins/
(= PGP public key available upon request or finger khawkins@ncsa.uiuc.edu
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Sat, 15 Mar 1997 13:32:58 GMT
From: mail@dmcclure.org (Douglas McClure)
Subject: Re: How to spam - legitimately
Message-Id: <332d7836.250388792@news.sarenet.es>
I cast my vote FOR:
"some e-mail"
"an e-mail message"
"a piece of e-mail"
(with or without the hyphens)
and AGAINST:
"an e-mail".
--
Doug McClure <mail@dmcclure.org>
------------------------------
Date: 13 Mar 1997 15:00:24 GMT
From: brianh@zilch.co.symbios.com (Brian Howell)
Subject: Just a Test!
Message-Id: <5g94q8$4oj@herald.ks.symbios.com>
------------------------------
Date: 12 Mar 1997 20:03:35 GMT
From: jason@wisteria.cs.odu.edu (Jason C Austin)
Subject: Re: Knowing the pid of a fork()'ed child, really
Message-Id: <JASON.97Mar12150335@wisteria.cs.odu.edu>
In article <331D8DCB.43E7@fnal.gov> Elliott McCrory <mccrory@fnal.gov> writes:
=> perl 5.0003 qeustion under Solaris 2.4/2.5 (SPARC).
=>
=> fork() returns the pid of the child to the parent. I need the pid for a
=> status file which I must maintain for similar processes. The trouble is
=> that exec() does not *always* make the process run under the same pid #
=> as what the fork returns. For example, if you do `exec("some-process
=> 2>errorlog")` (which is exactly the sort of thing I need to do,
=> otherwise the STDERR messages from some-process get spewed around the
=> system), exec() recognizes the ">" shell metacharacter and says "sh -c
=> some-process 2>errorlog" (in this case), creating a new pid number.
=> MOST of the time, the pid is "fork() + 1", but some of the time it is
=> "fork()+2", and some (rarer) time, "fork()+3", and probably so on.
=>
=> How can I deal with this so that the parent process really knows what
=> the pid of the process is that I need? I have a workaround now that
=> when "fork()+1" is not found, it tries "fork()+2", but is still fails if
=> the pid goes to "fork()+3".
This is one of those perlish things meant to make life easier
but end up causing problems. If exec is given a single element and
that element contains /bin/sh metacharacters, "/bin/sh -c" is execed
instead with the element as a paramter. /bin/sh then makes another
fork to execute the command which is why the PID is changing.
Personally, I think this is a mistake. If I wanted to run
something under the shell, I would use system() and would rather not
have to worry if my command has shell metacharacters in it. It's a
real pain when what you're execing was passed in on the command line
and has already been processed by the shell once.
Here's what you really want to do:
select(STDERR); $OUTPUT_AUTOFLUSH = 1;
select(STDOUT); $OUTPUT_AUTOFLUSH = 1;
if (($pid=fork())==0) {
open(STDERR, ">errorlog");
exec "some-process";
die "some-process: $OS_ERROR";
}
--
Jason C. Austin
austin@visi.net
------------------------------
Date: 15 Mar 1997 07:54:50 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: learning perl
Message-Id: <5ge66q$2h6@panix.com>
[ mailed and posted ]
In <3329EEC6.537B@pobox.com> sean <henriques@pobox.com> writes:
>any suggestions on how a newbie can painlessly pickup the basics of
>perl?? Perhaps an online tutorial ??
Try: Perl Reference/Tutorials, Guides, and FAQs
http://www.panix.com/~clay/perl/query.cgi?tutorials+index
>pls. respond to mailto://henriques@pobox.com
Is that a valid URL? :)
--
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: 13 Mar 1997 18:10:58 GMT
From: jfriedl@tubby.nff.ncl.omron.co.jp (Jeffrey)
To: netog@cinteractive.com (Ernesto Gianola)
Subject: Re: multi-line mode and m//m
Message-Id: <JFRIEDL.97Mar14031058@tubby.nff.ncl.omron.co.jp>
[mail and post]
Ernesto Gianola <netog@cinteractive.com> wrote:
|> I am parsing data that looks like this
|
|> Tues 3/11
|> U Broken Toys, Sqwags, Project Unconfined, Romeo Vegas 18+ $6
|> D Doors at 8pm: Dave Thomas (of Pere Ubu) and Two Pale Boys,
|> Little John 18+ $8adv/$10 dos
|> C Gonzalo Silva
|
|> Now I can parse through fine if all entries existed in a single logical
|> line. In other words, the $bands variable misses text sometimes. I can't
|> use m//gms in my second while loop without .* swallowing too much text.
If the format is random, you'll have a pretty tough time. However, if you
know the contination line always does not start with some particular regex
(such as, say, m/\n[UDC] /m), you might try the following (untested code)
in your loop:
: (at this point, $_ has the full paragraph)
:
s{
\n [UDC] # an embedded line starting with /[UDC]/
[^\S\n]+ # non-\n whitespace. Or perhaps use [ \t] for simplicity
}{ }gx;
:
: (now entries are line-based)
(Note that the substitution uses neither /m nor /s. /m is irrelevant because
there are no line anchors (/^/ or /$/), and /s is irrelevant because there
is no dot.)
Jeffrey
----------------------------------------------------------------------------
Jeffrey Friedl <jfriedl@ora.com> Omron Corp, Nagaokakyo, Kyoto 617 Japan
See my Jap<->Eng dictionary at http://www.wg.omron.co.jp/cgi-bin/j-e
O'Reilly's Regular Expression book: http://enterprise.ic.gc.ca/~jfriedl/regex/
------------------------------
Date: Fri, 14 Mar 1997 19:22:05 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Bob Maillet <Bob_Maillet@dg.com>
Subject: Re: Perl and ypcat
Message-Id: <Pine.GSO.3.95q.970314192102.11801D-100000@linda.teleport.com>
On Fri, 14 Mar 1997, Bob Maillet wrote:
> Is there a command or commands that can invoke ypcat filename to work
> in perl?
Yes, but you probably don't want them. :-) You probably want the getpw*
functions, documented in perlfunc(1). 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: Fri, 14 Mar 1997 20:22:26 GMT
From: "Daniel McManus" <mcmanus@ait.fredonia.edu>
Subject: PERL on Windows NT
Message-Id: <01bc30b5$ffc14000$7c17ee8d@mcmanus>
Anyone out there using WindowsNT and have PERL running.
I tried to set up PERL on NT and its not working. But I'm too baffeled to
be able to say what the symptoms are so, if there is anyone out there who
is doing this please contact me so I can ask you a couple of questions.
Thanks greatly
--Dan McManus
------------------------------
Date: 15 Mar 1997 00:06:07 -0600
From: Jerry Sievers <gsievers@gsievers.xnet.com>
Subject: Re: PERL Programmer needed
Message-Id: <x7hgid1ygg.fsf@gsievers.xnet.com>
gzsmith@hotmail.com (Gloria Z. Smith) writes:
>
> Please forward your hourly rate if interested.
>
is that all you care about?
--
@------------------------------------------------------------------@
| Jerry Sievers Unix Admin/Web Site Architect |
| 312 527-0618 (home) mailto:gsievers@xnet.com |
| 847 267-3594 (work) http://www.xnet.com/~gsievers |
@------------------------------------------------------------------@
------------------------------
Date: Sat, 15 Mar 1997 13:38:54 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: Perl Question
Message-Id: <E7378v.Eqz@presby.edu>
Matthew Stich <mstich@erols.com> wrote:
>
>Would somebody mind looking at my script,
If you post it as plain text instead of encoding it, somebody *might*
look at it, especially if you use a more informative "Subject:" line.
> I think there are some problems, but I am not sure
>how to correct them.
It would help a lot if you told us what the "symptoms" are. What is the
script supposed to do, and what is it actually doing?
--
Jon Bell <jtbell@presby.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
[for beginner's Usenet info, see http://web.presby.edu/~jtbell/usenet/ ]
------------------------------
Date: Sat, 15 Mar 1997 11:33:37 +0000
From: Jason Brome <jase@shocknet.demon.co.uk>
Subject: Q: File renaming and locking
Message-Id: <332A8911.4963@shocknet.demon.co.uk>
Hi,
I'm currently working on a project for which I'm using a data file
to store records with various items of information in it. Included
in the tasks I need to perform on this file are updating and removing
items from this.
After searching through Deja News and the FAQ, I've read up on some
articles about how to achieve this, but I can't seem to find any which
refer to locking the files (datafile + temporary) during the updating
process, with special reference to the rename process.
If I was to exclusively lock the data and temporary files after
opening them, and then unlock them after performing the rename,
would the locks apply to the rename as well as the normal file I/O
operations?
Any advice would be most appreciated,
Cheers,
Jason
--
-* Jason Brome - jase@shocknet.demon.co.uk - phone: 0973 621847
-* fax: 0121 244 8353 - web: http://www.shocknet.demon.co.uk/
------------------------------
Date: Sat, 15 Mar 1997 00:41:10 -0600
From: narendran@hotmail.com
Subject: running perl/cgi scripts on Win95 m/c
Message-Id: <858406690.22545@dejanews.com>
hi,
Could somebody tell me how to run perl cgi scripts on a windows 95 m/c.
I have written the script, and want to test it. How do i call the same
from the browser ?
Thanx in advance
cheers
Naren
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Fri, 14 Mar 1997 19:50:29 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Jim Shi <jims@ss5mth44.franklin.com>
Subject: Re: sort large array
Message-Id: <Pine.GSO.3.95q.970314194858.11801G-100000@linda.teleport.com>
On Fri, 14 Mar 1997, Jim Shi wrote:
> use
> sort by_my_cmp @a
>
> to sort @a. If @a is very large. it's very slow. how can make it fast?
Make @a smaller. :-)
Or, you could see about speeding up by_my_cmp, since that's being called
hundreds or thousands of times. Since my screen is dirty, I can't see that
routine, but if you post it, somebody here might have some suggestions.
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: Sat, 15 Mar 1997 06:57:10 GMT
From: niksun@lconn.net (Niksun)
Subject: Sorting help
Message-Id: <332a4749.38304890@news.inetw.net>
Here's my problem. Let's say that:
@stuff = ("aaaa","BBBB");
When I sort @stuff:
@sorted = sort (@stuff);
the order gets switched to ("BBBB","aaaa") because capital letters are
placed before lowercase letters. I don't want this. I want to be
able to sort an array so that everything is sorted by letter,
regardless of case. In other words, an example final sort would be:
adam
James
Michael
robert
Thanks.
Niksun
------------------------------
Date: Sat, 15 Mar 1997 00:55:47 GMT
From: tgy@chocobo.org (Tim Gim Yee)
Subject: Re: Sorting help
Message-Id: <3329eefd.140372364@news.oz.net>
On Sat, 15 Mar 1997 06:57:10 GMT, niksun@lconn.net (Niksun) wrote:
>Here's my problem. Let's say that:
>
>@stuff = ("aaaa","BBBB");
>
>When I sort @stuff:
>
>@sorted = sort (@stuff);
>
>the order gets switched to ("BBBB","aaaa") because capital letters are
>placed before lowercase letters. I don't want this. I want to be
>able to sort an array so that everything is sorted by letter,
>regardless of case. In other words, an example final sort would be:
# The *drum roll* Schwartzian Transform!
@stuff = qw(Michael robert adam James);
@sorted = map {$_->[0]}
sort {$a->[1] cmp $b->[1]}
map {[$_, lc $_]}
@stuff;
print join "\n", @sorted;
>adam
>James
>Michael
>robert
Hope that helps!
-- Tim Gim Yee tgy@chocobo.org
http://www.dragonfire.net/~tgy/moogle.html
"Will hack perl for a moogle stuffy, kupo!"
------------------------------
Date: 15 Mar 1997 11:15:05 GMT
From: "Rudy Ruiz" <rruiz@cybercities.com>
Subject: Re: Sorting help
Message-Id: <01bc3133$91e61780$53b08ccc@mystra>
Perhaps you could convert these name to lowercase if case isn't a
huge deal.
Obviously it 'could' be done with
foreach (@mylist) {
$_ =~ tr/A-Z/a-z/;
}
>From there you could run your normal sort function.
I'm sure there are other ways, but there is one for ya. Hope it helps.
Rudy
>
> @stuff = ("aaaa","BBBB");
>
> When I sort @stuff:
>
> @sorted = sort (@stuff);
>
> the order gets switched to ("BBBB","aaaa") because capital letters are
> placed before lowercase letters. I don't want this. I want to be
> able to sort an array so that everything is sorted by letter,
> regardless of case. In other words, an example final sort would be:
>
------------------------------
Date: Sat, 15 Mar 1997 07:10:45 GMT
From: abigail@ny.fnx.com (Abigail)
Subject: Re: sourcing (bash) config files within perl
Message-Id: <E72p9x.H4w@nonexistent.com>
On Fri, 14 Mar 1997 16:17:33 +0000, Laurence Molloy wrote in comp.lang.perl.misc,comp.lang.perl:
++ Hi,
++
++ Does anybody have an answer to this problem that doesn't involve
++ actually reading in the necessary config files and assigning each
++ variable manually by pattern matching, or including the variables in the
++ .bashrc file?...
++
++ I have a configuration file of environment variables (for bash shell)
++ which I can source at the command line, to add to my usual set. However,
++ I need to ensure that all my perl scripts automatically use these
++ environment variables. Now, I've tried the obvious within my perl
++ scripts. i.e.
++
++ system ". <config filename>"; # Sources the config file.
++
++ foreach $key (sort(keys %ENV)) # Prints out current set of
++ { # environment variables
++ print $key, '=', $ENV{$key}, "\n";
++ }
++
++ However, this doesn't work because the system command actually creates a
++ sub-process which, when exited, loses all its additional environment
++ variables. Are there any neat perl commands that do the same without
++ creating a sub-process?
Well, the easiest way is to create an extra file. Put your perl
program in a file called program.pl and the environment in a
file called config.sh. Now the actual program will be something
like:
#!/usr/local/bin/perl -w
system ". /path/to/config.sh; perl -w /path/to/program.pl" and
die "Got error $?";
__END__
This will put the perl program in the same subshell as the sourcing
of the config file. (Make sure you export the variables!).
Of course, a 2 line bash script will do the same.
If you really must put everything in one file, use a trick like:
#!/usr/local/bin/perl -w
my $program = <<EOF;
print "Hello!\n";
print "\\\$ENV{FOO} = \$ENV{FOO}\n";
EOF
system ". /home/abigail/config.sh; perl -w -e '$program'"
and do {$! = $? >> 8; die "Got error: $!";};
__END__
(It prints out Hello and the environment variable FOO).
Abigail
------------------------------
Date: Sat, 15 Mar 1997 09:12:15 GMT
From: paowan@drdun.com (Pao Wan)
Subject: What is the limitation to use DBD::Oracle module?
Message-Id: <5gdp8g$pai$3@news.hkol.com>
Is the Oracle module for perl only support a limited subset of Oracle SQL?
Will it be wise to switch PL/SQL with Oracle Webserver?
------------------------------
Date: Sat, 15 Mar 1997 00:20:22 -0500
From: sleichte@nb.net (Stuart Leichter)
Subject: Re: What's wrong with "an email" (was: How to spam - legitimately)
Message-Id: <sleichte-1503970020230001@wheat-023.nb.net>
In article <332cbbc3.14908447@news.tcp.co.uk>, laker@tcp.co.uk (Markus
Laker) wrote:
> Tom Christiansen <tchrist@mox.perl.com>:
>
> > What instead we've been complaining about in these parts is the pernicious
> > mut(il)ation of "email" into a count noun, much the way many Germans
> > (improperly) do with "information" when first learning to speak English.
>
>
> The fact is that if enough people use it, 'emails' will become
> acceptable English and there isn't a thing we can do about it. That, I
> predict, is what will happen over the next few years. You leave the
> language in the hands of the common people for a couple of thousand
> years, and what do they do with it?
>
> > I have come to believe that the linguistic dissonance we're experiencing
> > is rooted in this: that the American mass media, a body congenitally
> > devoid of all semblance of clue and subtlely, have insistently pushed the
> > nontechnical masses on the internet bandwagon, and in so doing, they have
> > unknowingly mangled an established term.
>
Sniff, sniff, and all that. Our first-class, second-class, email, parcel
post, and others might indicate that our mails are no better or worse than
your mails.
--
Stuart Leichter
----
Unlike rules, distinctions are made to be kept.
----
Q: Your grammar leaves something to be desired; no offense intended.
A: None took.
------------------------------
Date: Sat, 15 Mar 1997 10:02:04 GMT
From: Philip Eden <philip@weather.demon.co.uk>
Subject: Re: What's wrong with "an email" (was: How to spam - legitimately)
Message-Id: <858420124.13005.0@weather.demon.co.uk>
laker@tcp.co.uk (Markus Laker) wrote:
<snip>
>On the other hand, people can justifiably point to the conciseness and
>convenience of 'emails', and it isn't only illiterates who use it: even
>The Times of London uses 'emails' without shame.
>
<snip>
>Markus Laker.
>
Now, why did I do a double-take when I read that line, Markus?
Could it be that The Times is now a shameless hussey of a newspaper,
populated by sub-literate hacks, pandering to the whim of the
paper's proprietor? (Murdoch, R., for anyone who wonders). But
then I do write for a competitor.
Philip
------------------------------
Date: Sat, 15 Mar 1997 11:54:09 GMT
From: ross@valnet.es (Ross Howard)
Subject: Re: What's wrong with "an email" (was: How to spam - legitimately)
Message-Id: <5ge2si$355$1@diana.ibernet.es>
Philip Eden <philip@weather.demon.co.uk> wrote:
>laker@tcp.co.uk (Markus Laker) wrote:
><snip>
>>On the other hand, people can justifiably point to the conciseness and
>>convenience of 'emails', and it isn't only illiterates who use it: even
>>The Times of London uses 'emails' without shame.
>>
><snip>
>>Markus Laker.
>>
>Now, why did I do a double-take when I read that line, Markus?
>Could it be that The Times is now a shameless hussey of a newspaper,
>populated by sub-literate hacks, pandering to the whim of the
>paper's proprietor? (Murdoch, R., for anyone who wonders). But
>then I do write for a competitor.
The one whose style sheet neglects to remind staff writers that
"hussy" is written without an *e*, it would seem.
(It's the a.u.e. equivalent of Murphy's Law: "The vehemence of your
bitching about the language proficiency of others is in direct
proportion to the probability that in so doing you will royally screw
up and make a right prat of yourself.")
Ross Howard
Ross Howard
------------------------------
Date: 15 Mar 1997 08:08:54 -0500
From: rnewman@shell1.cybercom.net (Ron Newman)
Subject: Why doesn't flock() work properly on Solaris?
Message-Id: <5ge717$lc2@shell1.cybercom.net>
I'm moving a perl 5.003 script from SunOS to Solaris, and finding
that my calls to flock() no longer work as expected. Why?
The problems I'm having are:
- If I open the file for read-only and then try to
flock() it for shared access, flock() returns 0 (failure).
- If I open the file for write access, and then try to
flock() it for shared access, flock() returns 1 (success)
but acts is if I now have *exclusive* access -- another
process waiting for the share lock will block.
Why does perl 5.003's flock() behave this way on Solaris?
I also have a C program that also calls flock(), and it doesn't
exhibit any of this weird behavior.
--
Ron Newman rnewman@cybercom.net
Web: http://www.cybercom.net/~rnewman/home.html
------------------------------
Date: Sat, 15 Mar 1997 07:23:57 GMT
From: cmlee@netcom.com (Chen-Ming Lee)
Subject: Win32: Building pll's from BC++?
Message-Id: <cmleeE72pvx.FM0@netcom.com>
Hi, has anybody successful built pll's with Borland's C++ compiler,
instead of MS VC++? I've got both the source code and the pre-compiled
executable for Win32 Perl installed. I am using the pw32i303 release
from ActiveWare.
I was thinking that perhaps I could compile my extension with the
header files in the source and then test with the executable. I was
not able to build Perl from the source with BC++ and so I couldn't
follow the procedure for building pll's in the FAQ.
Any idea? Thanks!
- Tom, cmlee@netcom.com
------------------------------
Date: Sat, 15 Mar 1997 06:44:19 GMT
From: abigail@ny.fnx.com (Abigail)
Subject: Re: year 2000 question
Message-Id: <E72o1v.Dz6@nonexistent.com>
On 13 Mar 1997 18:52:10 GMT, Jeffrey wrote in comp.lang.perl.misc:
++
++ Dan Ellsweig (Enterprise Management) <dxe@cassidy.sbi.com> wrote:
++ |> Does anyone know of a version of PERL which will support
++ |> 4 character year as returned by localtime()??
++
++ localtime returns a number for the year, not a string.
Note that Perl 5 will return a 4 digit year with localtime (),
if you care to wait till the last year of the 29th century.
And it'll do so for the next 900 decades after that.
Abigail
------------------------------
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 122
*************************************