[6568] in Perl-Users-Digest
Perl-Users Digest, Issue: 193 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 27 23:07:19 1997
Date: Thu, 27 Mar 97 20:00:25 -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 Thu, 27 Mar 1997 Volume: 8 Number: 193
Today's topics:
Banner Rotator?? <Bman99970@mindspring.com>
Re: cant get sdbm_fil to work under win95 <zephyr@wesell.com>
Re: crypt <rootbeer@teleport.com>
Re: Directory Listing in Perl (Abigail)
Re: File Locking <rra@stanford.edu>
finding out which user added modules are installed <dmi1@ra.msstate.edu>
Re: glob function <rra@stanford.edu>
Re: global my() variable used in foreach() loop loses i (Nathan V. Patwardhan)
Re: how2 run perl on win 3.11 system?? <skinnard@vcd.hp.com>
I would have entitled it that too... <jon_u@dev5.byte.com>
Re: need cross reference checker (Geoffrey Hebert)
Re: Newbie asks how do I format a numeric output? <rootbeer@teleport.com>
Objective C is cool. (Re: Who makes more $$..) <vladi_mip@uniserve.com>
Re: Parsing file problem (Dave Rupp)
Perl parser module w/ state? <keesh@cs.cmu.edu>
Re: Perl script for generating a one-time password <rootbeer@teleport.com>
Re: Perl, Delphi, Linux, Windows, and databases (VB5E?) (Chuck Morrison)
Re: perl5 for sgi irix4.0.5?? (Bill Kannawin)
Perl5.002: push() goes into infinite loop, need advice <eryq@enteract.com>
Re: print "Content type: text/html\n\n"; <brinthl@ch.etn.com>
Re: printing associative arrays in order <tchrist@mox.perl.com>
Re: q (Tad McClellan)
Re: q <rootbeer@teleport.com>
Q: tr (Henry Chan)
Re: Q: tr <rra@stanford.edu>
Re: Qestion about Exporter!! Please Help!! (Randy)
Question about the SYSTEM functionIn a Perl program I a (Efigenio Vieira de Ataide)
Re: QUESTION: rewriting a single line as several shorte (Tad McClellan)
Re: Regular Expresion question. (Jon Drukman)
sdbm options <zephyr@wesell.com>
Server Error-what's up? <zauter@usa.net>
Re: TPJ: Nukes (John Stanley)
Re: What's a good Perl book? <blongwor@student.umass.edu>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 27 Mar 1997 21:32:20 -0500
From: Michael Burdick <Bman99970@mindspring.com>
Subject: Banner Rotator??
Message-Id: <333B2DB4.4B25@mindspring.com>
If anyone has a banner rotator or knows where to get one please e-mail
me! Thanks!!
Michael
E-mail: Bman99970@mindspring.com
------------------------------
Date: 27 Mar 1997 23:06:32 GMT
From: "John Z." <zephyr@wesell.com>
Subject: Re: cant get sdbm_fil to work under win95
Message-Id: <01bc3af9$96172c20$2ad4b7cc@cheetah>
john z. <zephyr@wesell.com> wrote in article
<01bc3965$b4a4a360$0ad4b7cc@pciii>...
> im trying to use sdbm_file on a perl5/ win95 platform. i used the perl
> binaries to install
>
> first thing i noticed was that several of the library files are shortened
> to fat16. this is
> apparently having quite an effect.
>
> ive edited the dynaload.pm and sdbm_fil (the extra characters are dropped
> by fat 16
> on win95) as best as i could to shorten dynaloader.* and autoloader.*
>
> right now i get an error: cant call method "bootstrap" in empty paackage
.
> line 7.
>
> has anyone gotten this to work with a fat16? if so- how.
> tks.
> john z.
> zephyr@wesell.com
>
>
answer in case somebody else is trying is
1. perl 5001m does not properly make long file name on the install. you can
not use sdbm or any of the other modules that reference long names. to see
if your installation worked, note if you have sdbm_fil.pl or sdbm~1.pl in
the directory. if its the later, you are ok.
2. perl 5.003beta installs fine. and works.
------------------------------
Date: Thu, 27 Mar 1997 17:24:48 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Michael Guitton <webmaster@cardshow.com>
Subject: Re: crypt
Message-Id: <Pine.GSO.3.96.970327172220.15008C-100000@kelly.teleport.com>
On Thu, 27 Mar 1997, Michael Guitton wrote:
> if (/^$form{'username'}:/o) { # find username
Ouch! I hope that nobody puts a parenthesis into that blank in your form!
I suspect that you could use either string equality ('eq') or index in
place of interpolating unknown stuff into a regular expression. But if you
must, use \Q and \E as needed. 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: Thu, 27 Mar 1997 19:26:07 GMT
From: abigail@ny.fnx.com (Abigail)
Subject: Re: Directory Listing in Perl
Message-Id: <E7pvBK.vJ@nonexistent.com>
On 27 Mar 1997 07:10:54 -0700, Randal Schwartz wrote in comp.lang.perl.misc:
++ >>>>> "Eric" == Eric Bohlman <ebohlman@netcom.com> writes:
++
++ Eric> Tom Phoenix (rootbeer@teleport.com) wrote:
++ Eric> : On 25 Mar 1997, Sriranga R. Veeraraghavan wrote:
++
++ Eric> : > for($a=0;$a<=$#files;$a++){print "$files[$a]\n";}
++
++ Eric> : Maybe you meant this? :-)
++
++ Eric> : for (@files) { print "$_\n" }
++
++ Eric> Or even
++
++ Eric> print join("\n",@files),"\n";
++
++ Ugh. How about
++
++ print map "$_\n, @files;
++
++ But the foreach solution is still faster. (Gut level feel here.
++ Building a single string looks like work [join]. Building a list
++ looks like less work [map]. But simply walking the list is fastest
++ [foreach]. If someone would care to prove me wrong, I'll certainly
++ listen. :-)
What about:
{local $, = local $\ = "\n";
print @files;}
No map, no join, no foreach.
The foreach has the disadvantage of calling print for each element
of the list, something the join and map don't suffer from.
Abigail
------------------------------
Date: 27 Mar 1997 16:45:21 -0800
From: Russ Allbery <rra@stanford.edu>
To: "Rich Schramm" <rdschramm@scripps.com>
Subject: Re: File Locking
Message-Id: <qumg1xg6dzy.fsf@cyclone.stanford.edu>
[ Posted and mailed. comp.lang.perl snipped, as it's a dead group. ]
In comp.lang.perl.misc, Rich Schramm <rdschramm@scripps.com> writes:
> I am concerned about blocked processes attempting to write to my file
> after I unlock it but before I close it.
Good thing to be concerned about.
> For example, I open the file, lock the filehandle exclusive, write to
> the file, unlock the filehandle, then close the file. Is it possible
> that blocked processes will either do an open on the file immediately
> after I unlock it but before it is closed?
Yes. You don't want to unlock the file yourself; you want to let Perl
(or, more accurately, your operating system) do it for you. If you use
flock() to lock your file, all flock() locks are released automatically
when the file is closed. You don't have to unlock yourself.
> And what will keep two or more blocked processes from doing opens before
> any of them have time to do a lock?
Nothing. That's why they shouldn't do anything until they acquire the
lock, and if they're unable to acquire the lock they should close the file
and retry later.
--
Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
------------------------------
Date: 27 Mar 1997 18:41:09 -0600
From: David Ishee <dmi1@ra.msstate.edu>
Subject: finding out which user added modules are installed
Message-Id: <m3iv2c26hl.fsf@gsubc.dot.edu>
Is there an easy way to determine what modules you have added to your
perl setup? When I download a new cool module to install, the README
may give a list of other modules which are required. I can see that
when I run perl Makefile.PL that it checks to see what is installed. I
was wondering if there was a perl command, or script out there that
could give a listing of each module installed on the system: user
added ones (&&/|| base modules) with version numbers.
Being able to see what modules are installed on the system becomes
more important if I wrote a script on my machine, but want to use it
on another machine which may not have the appropriate modules
installed.
I looked at perllocal.pod on my machine but it doesn't contain info on
the module name: only version, install directory, etc.
I use perl on my Linux machine at home, and the other machine I want
to check runs UNIX.
--
David
+--------------------------------------------------------------------+
| David Ishee |
| Mechanical Engineer, MS grad student dmi1@ra.msstate.edu |
| Mississippi State University |
| |
+------------- http://www2.msstate.edu/~dmi1/index.html -------------+
------------------------------
Date: 27 Mar 1997 17:03:28 -0800
From: Russ Allbery <rra@stanford.edu>
To: "Steve Styerwalt" <sstyerwa@cisco.com>
Subject: Re: glob function
Message-Id: <qum7mis6d5r.fsf@cyclone.stanford.edu>
[ Posted and mailed. ]
Steve Styerwalt <sstyerwa@cisco.com> writes:
> I have a perl script which works great on my win95 machine, but under
> NT4 it fails on the glob function. Does anybody know why the glob
> function is not working on my NT4 machine?
Probably because glob is internally implemented by forking off a shell
(yes, ew). glob is currently one of Perl's ugliest implementation
details; I'd highly recommend eschewing it in favor of opendir/readdir
with grep.
--
Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
------------------------------
Date: 27 Mar 1997 21:49:53 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: global my() variable used in foreach() loop loses its value
Message-Id: <5heq21$2em@fridge-nf0.shore.net>
Devin Ben-Hur (dbenhur@egames.com) wrote:
: Specific enough?
: You do keep the Camel handy don't you? If so,
: why not? I could probably give you a 4 step process
: that would find the relevant info in the man pages too,
: but I think I'll leave that one as an exercise.
Sure. The Camel book is on a shelf shared by everyone in our
office, including Ron. IMHO, scoping with my() can be tricky
(definitely non-trivial), and the test example he posted was based
on a larger program that was experiencing larger problems.
: Do we really need to give instructions on *basic* searching
: and reading skills in this group?
We don't need any instructions today, thanks. Ron *did* receive
*quality* answers from others, so thanks for your tough love, and
please exercise your frustrations on "Tickle-Me-Elmo" in the future,
not on people asking reasonable questions.
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: Thu, 27 Mar 1997 13:47:54 -0800
From: Scott Kinard <skinnard@vcd.hp.com>
Subject: Re: how2 run perl on win 3.11 system??
Message-Id: <333AEB0A.4BBB@vcd.hp.com>
I've got the Perl 5.001 MS-DOS port running on a 386 in Win3.1 with no
problems. There are some Unixy things it won't do, but then I'm not
trying to do them anyways. Try looking at the Perl Home Page
(http://www.perl.com/) for a link to the site that has it. I was there a
few days ago and it looks like they are up to 5.003 or something now.
Scott
Harald Joerg wrote:
>
> [...with copies to Tom and Marc]
>
> Tom Christiansen wrote:
> > In comp.lang.perl.misc,
> > rubinm@aztec.asu.edu writes:
> > :I'd like to develop perl app on my windows 3.1/486 machine. Would be
> > :most grateful for instructions on how to get started.
> >
> > Simple:
> >
> > Rule 1: upgrade to Linux
> > Rule 2: install perl if it wasn't on your install kit
> > Rule 3: type perl
> >
> > Some would point out that you could also install win95 or winNT
> > at rule 1, but I prefer my version. It's cheaper and more useful. :-)
>
> And, in addition, I keep pointing out that you _can_ run Perl 5.003
> on Windows 3.11. The installation of Perl took me about half an hour
> (including the download). Maybe I am wrong, but I think installing
> Linux is not that easy.
> Here is what I posted some days ago:
> -----------------------------------------------------------------
> Zac wrote:
> > Is it possible to learn Perl on an old 486 running 3.11.
>
> I hope so, since I'm currently trying to do that ;-)
> I use Ilya Zacharevich's OS/2 port (Perl 5.003) and brought it to my
> PC following a recipe which Dean Pentcheff posted here several times.
> It allows me to test quite complex CGI scripts (including DB_File,
> CGI, parts of libwww, etc) locally on my PC.
> -----------------------------------------------------------------
>
> ...Let me add the following now:
> This Perl port does not support Socket networking (or maybe I
> am too stupid to get it running).
>
> You should find out where to get PERL ports from in your
> neighbourhood - otherwise you could find the location from
> <URL:http://www.perl.com/CPAN/>.
>
> From CPAN there should be a link to 'Ports', from there to
> either 'os2' or 'Ilyaz', who is named Ilya Zacharevich.
> The ftp path you need to download the Win3.11 modules might
> end in something like
> ....perl/cpan/ports/os2/ilyaz/5.00305/
> --
> Good luck,
> --haj--
------------------------------
Date: Thu, 27 Mar 1997 16:34:47 -0500
From: Jon Udell <jon_u@dev5.byte.com>
Subject: I would have entitled it that too...
Message-Id: <333AE7F6.E2E@dev5.byte.com>
...but unfortunately, we don't have room for titles that long.
For what it's worth, the only reason that the article is not something
you would have said should have been titled "Perl's Future in the world
of distributed objects, and CORBA/IIOP-aware web servers and web
clients" is that I don't have a Perl that plays in that space. I think
Perl could, I think Perl should, I hope it will, and all the same
arguments would apply.
I don't happily submit to platform constraints from which I have been so
recently freed by the wonderful neutrality of Web servers, browsers, and
of Perl where I have do so much of my Internet-related development.
Which Perl development, by the way, continues to occur portably, for the
most part, on both NT and Linux.
Java has more recently become an option as well, since I've discovered
what is possible with servlets: lightweight service invocation,
thread-safe complex data, serializability. Java on the client side is
not yet in any way useful to what I do, but on the server side, it
complements Perl very nicely I am discovering.
So in the real here-and-now, I'm doing Perl CGI things, Java things, and
whatnot. I don't pretend otherwise -- my column is a month-by-month
record of what I've been building, and how, and why. This particular
column, though, did opt to be more forward-looking. I'll admit that
it's only my hope, not a currently-proven practical reality, that
server-side development -- enabled by COM and CORBA -- can become for
some interesting number of developers a matter of component assembly.
That, in other words, server development will become a two-tier game as
client-side development is becoming: a lot of moderately proficient
"solution builders" who script components; a smaller number of more
highly skilled "component builders" (used to be called, I guess, systems
programmers) who support that army of solution builders.
This model seems to make sense as a way to get a whole lot of custom
development done. And that's just what we're all going to need, now that
we've finally got a useful environment in place.
Jon Udell
------------------------------
Date: Thu, 27 Mar 1997 22:05:10 GMT
From: soccer@microserve.net (Geoffrey Hebert)
Subject: Re: need cross reference checker
Message-Id: <5heq0o$5e1$1@news3.microserve.net>
I am developing such a tool (well, almost)
Perl Cross-reference produces a gourp listing for all
programs together:
word:program:line1:line2 etc
Perl Cross-reference produces a perl listing
Line#:Level of Bracket: Line of source
original source followed by script cross-reference
word:line1:line2:lie3 etc
The output is placed in a directory and is displayable
through web browser. Each line is a link. Click on a line number
and there is your line.
I will need a beta site in a couple weeks - interested?
Armin Faltl <armin.faltl@siemens.at> wrote:
>We use perl for numerous scripts, and very often the need arises
>to understand someone elses code.
>So I4m seraching for tools to extract call trees, global variable
>usage, subroutine parameters and side effects, etc. from perl code.
>Even complexity metrics would be of value to use, since we now face
>the need, to keep perl sources maintainable in a team of about 10
>programers, and there is a lot of old code to rework.
>Thanks in advance,
> Armin
------------------------------
Date: Thu, 27 Mar 1997 14:23:27 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Russ <russ@hevacomp.demon.co.uk>
Subject: Re: Newbie asks how do I format a numeric output?
Message-Id: <Pine.GSO.3.96.970327142248.2061I-100000@kelly.teleport.com>
On Thu, 27 Mar 1997, Russ wrote:
> I using a perl script to multiply say 7.99 by 2 and I am getting a
> result of 15.980000000000000426. How can I limit this to 2 decimal
> places?
You probably want to use (s)printf to round it off at output time. 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: Thu, 27 Mar 1997 13:53:58 -0800
From: Da Borg <vladi_mip@uniserve.com>
To: Keith Alphonso <alphonso@ncs-ssc.com>
Subject: Objective C is cool. (Re: Who makes more $$..)
Message-Id: <333AEC76.5559C4FE@uniserve.com>
Keith Alphonso wrote:
[...........]
> Microsoft, on the other hand, flunked all of their CS classes, but did great in
> their marketing classes (straight A's). They have no idea what makes an
> operating system work (NT STILL doesn't have most of the stuff you learn in Op.
> Sys. 101!).
>
> Apple on the other hand figured they didn't even need an operating
> system...hell a set of ROM routines and a request that everyone use them is
> enough right! Well they been trying to patch around that for about 10 years.
>
> I've heard NEXT is cool, but constricted to a proprietary language
Not as cool as it's hyped to be. At least, it wasn't that cool when
I tried it about 2 years ago nor did I like it when I worked with it
last month. Compared to Linux or BSD it is somewhat heavier on hardware
and since then I keep away from all *Steps I see (NextStep, OpenStep,
AfterStep (wm), GnuStep and so on). Next has some nice GUI tools though.
> (Objective
> C). Can't really make too many comments about that though!
That is not correct. Objective-C is not proprietary and comes
with any regular Linux distribution on the same conditions as
the rest of GNU tools:
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc/encoding.h
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc/hash.h
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc/list.h
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc/NXConstStr.h
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc/objc-api.h
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc/objc.h
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc/Object.h
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc/Protocol.h
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc/sarray.h
/usr/lib/gcc-lib/i486-linux/2.7.2/include/objc/typedstream.h
/usr/lib/gcc-lib/i486-linux/2.7.2/libobjc.a
Objective-C was indeed developed by Next people but since it was
based on GNU code, it was released after a FSF letter to NextStep
lawyers. As a matter of fact, the subject has been recently
discussed in gnu.misc.discuss. From what I know, Objective-C is
a nice dialect of C but there are not many applications based
on the language. I think I may give it a try one day after I am
good enough in "regular" ANSI C.
[.........]
> Have a nice day!
The same to you. :)
--
When sending private email, please remove underscores in "vladi_mip".
#include <disclaimer.h> | *Good pings come in small packets*
vladimip @ uniserve.com | Ceterum censeo Microsoftam delendam esse
Vancouver, B.C. | SIGSIG -- signature too long (core dumped)
------------------------------
Date: 27 Mar 1997 23:00:42 GMT
From: drupp@ti.com (Dave Rupp)
Subject: Re: Parsing file problem
Message-Id: <5heu6q$218$1@tilde.csc.ti.com>
In <333AC77A.6C28@absyss.fr>, Douglas Seay <seay@absyss.fr> writes:
>[snip]
>
>perl: s/NULL[ ]+|/|/g
>sed: s/NULL[ ]+|/|/g
>
Ya know, I've tried and tried but this regular expression stuff just kills me.
I think I could do a WHOLE bunch more, faster and with less lines of code if it
would just click. Oh well. I've been in the "Mastering..." book but it just
doesn't click. I'll keep plugging along, but when post these really neat one
liners a quick snip on how & why would be great, at least for me ;-)
I'm an old mainframer and been teaching myself UNIX type stuff. I'll tell you
what, now learning assembler was a long time ago and maybe I've forgotten,
for me it seems ALC came easier than regexp. I WILL LEARN IT though...
Dave Rupp
Texas Instruments
Dallas, Texas USA
(972)927-5546
drupp@ti.com
http://www.ti.com/
------------------------------
Date: Thu, 27 Mar 1997 16:46:39 -0500
From: Eric Kischell <keesh@cs.cmu.edu>
Subject: Perl parser module w/ state?
Message-Id: <333AEABF.167E@cs.cmu.edu>
Hello,
I am a Perl Newbie who would like to get "his hands wet" on a project at
work. The project parses a messy log file for specific tokens and
creates a pretty report file. When I looked on the module archive, they
were listed in alpha/beta stage.
The authors have been impossible to reach.
modules
-------
String::MatchMany TOMC
String::Text::Parser PATM
Does anyone know of modules with similar functionality?
e.-
Original Post
-------------
Hello,
I am currently learning Perl and Java to augment my Web skills.
A project at work requires simple parsing abilities from a messy "log
file" to generate a clean report file. A "tagged" log file line may
have related items on following lines without a tag.
On the PERL FAQ String::MatchMany and
Text:: ::Parser seemed close to want I need.
I am a Perl NEWBIE and have about 2 weeks of a JAVA course.Does anyone
have recs for simple code "modules" that would
only require slight modifications to perform the above.
e.-
p.s.: Perl was recommended and Java seemed like it has some basic
support for String parsing via StringTokenizer.
ex. file in)
Configuration: Optotrak configuration filename:
/jjj/mrrob/ios_project/data/config/file.cfg @Fri Dec 13 11:59:04
1996
...
Junk: this is junk
Morejunk: more junk
...
Configuration:
Number of probes= 6
@Fri Dec 13 11:59:04 1996
Configuration:
Probe name number strobe num max distance calib method
calib for valid
for wand valid for calib calib order.
super_x rb#1 1 0.600 0 2 1 1 1
hip rb#3 3 0.600 0 0 0 0 0
tool_top rb#4 4 1.000 0 2 0 1 2
tool_bot rb#5 4 1.000 0 2 0 1 3
rb-06056 rb#6 5 0.600 0 2 1 1 4
@Fri Dec 13 11:59:04 1996
Data Acquisition Sphere: Pt #1 out of 1 collect f/ Sphere Centroid.
Pt x = 417.908905 y = -343.905121 z = 200.959473 collect by Ball
Probe. @Fri Dec 13 12:01:58 1996
ex. file out)
This is a nice report
---------------------
world rb#2 2 0.600 0 0 0 0 0
hip rb#3 3 0.600 0 0 0 0 0
Number of probes= 6 at Fri Dec 13 11:59:04 1996
Optotrak configuration filename: opto.cfg
Probe name number strobe num max distance calib method
calib for valid
for wand valid for calib calib order.
super_x rb#1 1 0.600 0 2 1 1 1
Pt x = 417.908905 y = -343.905121 z = 200.959473 collect by Ball
Probe at Fri Dec 13 12:01:58 1996
----------------------
thx in adv
e.-
------------------------------
Date: Thu, 27 Mar 1997 14:31:20 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Michael Guitton <webmaster@cardshow.com>
Subject: Re: Perl script for generating a one-time password
Message-Id: <Pine.GSO.3.96.970327142926.2061K-100000@kelly.teleport.com>
On Thu, 27 Mar 1997, Michael Guitton wrote:
> I just read RFC #1750 and I wonder if someone has ever wrote a Perl
> password generating facility based on this RFC.
Perhaps you would like Math::TrulyRandom? Or perhaps you would like to
write a module which uses it to generate good passwords? :-) Your
contributions to CPAN are welcome.
> I checked out CPAN but to no avail. BTW, a C -- comprehensive? :) -- PAN
> dedicated search engine is welcome.
Is this what you wanted?
http://ls6.informatik.uni-dortmund.de/ir/projects/SFgate/WAIT/CPAN.html
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, 28 Mar 1997 00:46:54 GMT
From: morrison@csn.net (Chuck Morrison)
Subject: Re: Perl, Delphi, Linux, Windows, and databases (VB5E?)
Message-Id: <333b14a6.28054591@news-2.csn.net>
I don't know if it would be better, but you might try Solid's
database. It seems to be pretty portable.
http://www.solidtech.com
On Tue, 25 Mar 1997 11:39:26 -0800, Chris Schoenfeld
<chris@ixlabs.com> wrote:
>ARGH!
>
>We are having trouble scaling some of our work.
>We have been doing Perl/CGI/database work with DB_File/Berkeley DB.
>Now I want to do some Client/Server work with Delphi.
>I want a new database which will support both.
>
>Delphi wants to use Oracle, Sybase, Informix, or Interbase.
>From what I understand, Perl has modules for some/all of these in
>various stages of robustness.
>NONE of these databases support Linux - GRRRR!!!
>
>I need a database I can run on Linux, Windows 95, Windows NT, and
>Solaris, that has excellent Linux Perl support and excellent Windows C/S
>RAD tool support. I am willing to switch to VB5 enterprise if that will
>help.
>
>I'm starting to beleive there is no such animal. I will probably have to
>find a Linux/Solaris database with ODBC (blechh).
>
>I started to evaluate Velocis, which seemed like a good choice - but
>their Perl module was comprised of a windows DLL! arg!
>
>It would be great if Sybase would just port to Linux. Then we could
>start off with SQL Anywhere and scale up development on both platforms.
>
>--
>Chris Schoenfeld
>IX Development Laboratories
>Santa Rosa, California
>(707)-543-8030 Ext. 12
------------------------------
Date: 27 Mar 1997 13:38:08 -0700
From: kannawin@q.osmre.gov (Bill Kannawin)
To: db@sgx.neep.wisc.edu
Subject: Re: perl5 for sgi irix4.0.5??
Message-Id: <5helrg$a2n@q.osmre.gov>
In article <DB.97Mar27113334@sgx.neep.wisc.edu>, db@sgx.neep.wisc.edu writes:
|> I don't have compilers on my Indigo irix 4.0.5 machine.
|>
|> Does anyone have an inst-able (or tardist) version of perl5
|> they could point me to??
|>
|>
|> thanks,
|>
|> dennis
You can get it from http://reality.sgi.com/scotth/info/perl5.html
HTH
--
Bill Kannawin (303)844-1479 kannawin@osmre.gov|
Technical Information Processing System |
US Office of Surface Mining; 1999 Broadway, |
Suite 3320, Denver, Colorado 80202 |
--
Bill Kannawin (303)844-1479 kannawin@osmre.gov|
Technical Information Processing System |
US Office of Surface Mining; 1999 Broadway, |
Suite 3320, Denver, Colorado 80202 |
------------------------------
Date: Thu, 27 Mar 1997 16:14:42 -0600
From: Eryq <eryq@enteract.com>
Subject: Perl5.002: push() goes into infinite loop, need advice
Message-Id: <333AF152.2743ECCE@enteract.com>
Perl5.002, on Linux:
Does anyone know of a situation that can cause push() to
lose its mind and go into an infinite loop? I've got a
situation in a (fairly large) CGI script where it does
precisely that after dealing with a pretty large (20K)
scalar variable. I call push(), and it never returns.
A "ps" on the process shows that it's still chewing up CPU
like a madman, but the allocated memory is not rising.
Does this sound like an out-of-memory condition to any
of you Perl internals gurus? Or a bug that might have
been corrected since 5.002?
TIA,
--
___ _ _ _ _ ___ _ Eryq (eryq@enteract.com)
/ _ \| '_| | | |/ _ ' / Hughes STX, NASA/Goddard Space Flight Cntr.
| __/| | | |_| | |_| | http://www.enteract.com/~eryq
\___||_| \__, |\__, |___/\ Visit STREETWISE, Chicago's newspaper by/
|___/ |______/ of the homeless: http://www.streetwise.org
------------------------------
Date: 27 Mar 1997 21:05:45 GMT
From: "Lee Brinton" <brinthl@ch.etn.com>
Subject: Re: print "Content type: text/html\n\n";
Message-Id: <01bc3af3$700263c0$7c0563a6@brinthl.bid.ch.etn.com>
Try
print "Content-Type: text/html\n\n";
instead of
print "Content type: text/html\n\n";
--
H. Lee Brinton
brinthl@ch.etn.com
6xtippet@b4futures.net
I do not speak for Cutler-Hammer
Brian Lorraine <lorraine@ait.nrl.navy.mil> wrote in article
<3338425B.41C6@ait.nrl.navy.mil>...
> This one always gets me. I'm writting a perl counter script. Here's the
> actual code:
> ################################
> #!/usr/bin/perl
>
> $filename = "testcount";
> ...
Is there an EXACT place I
> have to shove that "print "Content type: text/html\n\n";" line and the
> rest of it to get it to work??
------------------------------
Date: 27 Mar 1997 22:18:13 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: printing associative arrays in order
Message-Id: <5hern5$eei$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Ishwarya Rao <irao1@gaia.umbc.edu> writes:
:When an associative array is printed, the elements are printed in a
:random order.
:I was wondering if there is a one line command to print the elements
:of an associative array in the order in which it was created, rather
:than in a random order.
>From PerlFAQ part 4 (http://www.perl.com/perl/faq/index.html)
Q: How can I make my hash remember the order I put elements into it?
A: Use the Tie::IxHash module from CPAN.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Interestingly enough, since subroutine declarations can come anywhere,
you wouldn't have to put BEGIN {} at the beginning, nor END {} at the
end. Interesting, no? I wonder if Henry would like it. :-) --lwall
------------------------------
Date: Thu, 27 Mar 1997 16:58:40 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: q
Message-Id: <03ueh5.v9f.ln@localhost>
Jason Bodnar (jason@cimedia.com) wrote:
: jtbell@presby.edu (Jon Bell) wrote:
: > Tom Phoenix <rootbeer@teleport.com> wrote:
: >>On 26 Mar 1997, Anthony Mulligan wrote:
: >>
: >>> Subject: q
: >>
: >>a
: >
: >y?
: o, u ...
o u silly folks...
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Thu, 27 Mar 1997 14:24:43 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: q
Message-Id: <Pine.GSO.3.96.970327142357.2061J-100000@kelly.teleport.com>
On Thu, 27 Mar 1997, Andrew Johnson wrote:
> Subject: Re: q
> || ! 2 q?
do { !b 2 qt }
:-)
-- 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: 27 Mar 1997 22:06:10 GMT
From: hchan@didactic.portal.ca (Henry Chan)
Subject: Q: tr
Message-Id: <5her0i$8nh@thoth.portal.ca>
Hi,
I'm having problems with regular expressions with tr.
I'm trying to replace the first and last chars with a certain char.
i.e.
$old = "HELLO";
($new = $old) =~ tr/^.$./ML/;
I want the result
MELLT, but it doesn't seem to work.
What am I doing wrong?
thx,
Henry
------------------------------
Date: 27 Mar 1997 16:56:25 -0800
From: Russ Allbery <rra@stanford.edu>
To: hchan@didactic.portal.ca (Henry Chan)
Subject: Re: Q: tr
Message-Id: <qumbu846dhi.fsf@cyclone.stanford.edu>
[ Posted and mailed. ]
Henry Chan <hchan@didactic.portal.ca> writes:
> I'm having problems with regular expressions with tr.
You're going to have a lot of problems there. tr doesn't use regular
expressions. It only converts characters to characters and does some
other similar operations.
> I'm trying to replace the first and last chars with a certain char.
> i.e.
> $old = "HELLO";
> ($new = $old) =~ tr/^.$./ML/;
I'd do:
($new = $old) =~ s/^.(.*).$/M${1}L/;
There are probably faster ways to do this, but that one should work.
--
Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
------------------------------
Date: 28 Mar 1997 00:04:18 GMT
From: randy@byz.org (Randy)
Subject: Re: Qestion about Exporter!! Please Help!!
Message-Id: <5hf1u2$955$1@nntp2.ba.best.com>
Vipul M. Shah (vipul@xcaliber.com) wrote:
: I am getting the following message in one of my scripts at startup:
: Subroutine new redefined at /usr/local/lib/perl5/Exporter.pm line 133
: Exporter::export called at /usr/local/lib/perl5/Exporter.pm
: line 149
: Exporter::import called at ets.pl line 33
: main::BEGIN called at /v/XCB/XCB_INC/perl5/File/Monitor.pm line
: 0
: eval {...} called at /v/XCB/XCB_INC/perl5/File/Monitor.pm line
: 0
: File::Monitor is something I wrote. It has a @ISA = qw(Exporter); line in
: it, so it is an Exporter, and I use 'use File::Monitor in my main program,
: ets.pl. I have a sub new defined in it and I am exporting it.
I take it from the fact that File::Monitor.pm is defining a "new", that it
is designed as a class, and that new() is the constructor method?
Don't export methods. At all. Have users of this class call it via:
$fm = new File::Monitor ...
or
$fm = File::Monitor->new(...);
Randy
--
^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
randy@byz.org http://www.byz.org/~randy/
"Sometimes I think the surest sign that intelligent life exists elsewhere in
the universe is that none of it has tried to contact us." --Calvin
------------------------------
Date: Fri, 28 Mar 1997 01:17:14 GMT
From: ataide@planetarium.com.br (Efigenio Vieira de Ataide)
Subject: Question about the SYSTEM functionIn a Perl program I am trying to do the following:
Message-Id: <33137a39.2960411@adenine.c.dna.affrc.go.jp>
In a Perl program I am trying to do the following:
system("/sbin/diplogin", $user) == 0 || die "calling diplogin: $?\n";
&mysub;
.
.
When the user closes the connection the program
'diplogin' ends (abnormaly?), and the subroutine mysub isn't called.
Is there a way to have this subroutine called after the program
diplogin?
Thanks in advance for any help.
Efigenio Ataide
ataide@planetarium.com.br
------------------------------
Date: Thu, 27 Mar 1997 16:57:39 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: QUESTION: rewriting a single line as several shorter lines
Message-Id: <31ueh5.v9f.ln@localhost>
Terrence M. Brannon (brannon@kappa.usc.edu) wrote:
: I have a string containing a total of 100 digits which are either a 1
^^^^^^^^^^^^^^^
I will assume it is in $_
: or 0 sep'd by a single space in between them. I want to write this
: string to a file in which each line contains $lineLength number of
: digits, where $lineLength <= 16;
: How can I do this in Perl?
--------------------
#! /usr/bin/perl -w
$_ = '1 1 1 1 1 0 0 0 0 0 ' x 10; # 100 ones and zeros
$lineLength = 10;
@bits = split;
$cnt = 0;
foreach $bit (@bits) {
if ( $cnt == $lineLength ) { # if reached limit
$cnt = 0; # reset bit counter
print "\n"; # end this line
}
print $bit; # print the bit
# print "$bit "; # swap with above to keep a single space separator
$cnt++; # count how many on this line so far
}
print "\n";
--------------------
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 26 Mar 1997 00:42:49 GMT
From: jsd@cyborganic.com (Jon Drukman)
Subject: Re: Regular Expresion question.
Message-Id: <5h9re9$kbj$1@its.hooked.net>
Tom Christiansen (tchrist@mox.perl.com) wrote:
: How do I check a valid email address?
: You can't.
: Without sending mail to the address and seeing whether it
: bounces (and even then you face the halting problem), you
: cannot determine whether an email address is valid.
there is a spectrum between "send the message and see if it gets
there" and "accept anything a user cares to type." on our site we use
a two-pass scheme. one to filter out obvious bozos and then a
mailback scheme to ensure success with "valid-looking" addresses.
for example, "someone@.here.com" is not a valid address, yet you
wouldn't believe the amount of entries we get with that format. the
amount of work required to filter out those sorts of things is not
prohibitive.
---jsd
"Sanity is a one trick pony...you only get one trick: rational thinking...
but when you're good and crazy,the sky's the limit!!" - The Tick.
------------------------------
Date: 27 Mar 1997 22:58:33 GMT
From: "John Z." <zephyr@wesell.com>
Subject: sdbm options
Message-Id: <01bc3af8$786ad920$2ad4b7cc@cheetah>
im trying to put together a reasonalbly portable system which
unfortunately does need a few keyed file access mechanisms.
the db_file module with btree seems adequate for unix boxes.
any choices on the 95/ nt side? does sdbm support btree?
tks.
john z.
zephyr@wesell.com
------------------------------
Date: 28 Mar 1997 00:31:26 GMT
From: "Ken Zauter" <zauter@usa.net>
Subject: Server Error-what's up?
Message-Id: <01bc3b0f$d1182520$2ab772ce@kennyz>
I downloaded a perl program called Guestbook authored by Matt Wright. I'm
no newcomer to programming, just perl, so I know all about initializing
variables, etc... What I am new to also is the whole HTML - perl
connection. How does data get passed from an HTML file to a perl program?
Anyway, my real question is why do I keep getting server errors even after
making all the necessary changes to the perl program itself and its
associated HTML files? My ISP's webmaster insists there's "something wrong
with the program". Does this Matt Wright guy's stuff usually work?
My problem child is at http://www.dreamscape.com/kennyz/guestbook.html.
Any help will be greatly appreciated.
------------------------------
Date: 27 Mar 1997 22:14:35 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: TPJ: Nukes
Message-Id: <5hergb$h62@news.orst.edu>
In article <5hehgd$msf@fridge-nf0.shore.net>,
Nathan V. Patwardhan <nvp@shore.net> wrote:
>Mark Atwood (zot@ampersand.com) wrote:
>: Perl, that ultimately ended up burned into the ROMs of real nuclear
>: missiles...)
>
>I wouldn't be surprised. I have one version of Perl that works as an
>alarm clock, another that feeds the cat, and yet another that is holding
>up the dining room table. Perl does everything. :-)
One night as I was driving home my car ran out of gas. Fortunately I had
some spare Perl code in my briefcase. I put some in the gas tank and
made it home in record time. 90 MPH in first gear.
------------------------------
Date: Thu, 27 Mar 1997 16:31:07 -0500
From: Brett Longworth <blongwor@student.umass.edu>
Subject: Re: What's a good Perl book?
Message-Id: <333AE718.1698@student.umass.edu>
Greg Wrote:
> I have 2 suggestions for future reprints:
>
> 1.) A quick referance
There's a great one available free at:
http://www.xs4all.nl/~jvromans/perlref.html
It's about 25 pages and staples into a nice 4.5x8" booklet. I've just
started with perl, and it's great to not have to look through the camel
book just to find something silly, like \d+.
Having the llama book would help me out too I think.
-Brett
------------------------------
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 193
*************************************