[6295] in Perl-Users-Digest
Perl-Users Digest, Issue: 917 Volume: 7
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 9 03:07:14 1997
Date: Sun, 9 Feb 97 00:00:30 -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, 9 Feb 1997 Volume: 7 Number: 917
Today's topics:
5.003 Sys::Syslog Not Working <mbrennen@fni.com>
[Q:] whitespace <njb@cs.bham.ac.uk>
ANNOUNCE: Net::DNS 0.03 available (Michael Fuhr)
apedding to a list... <williams@irc.chmcc.org>
Re: apedding to a list... (Tad McClellan)
Re: apedding to a list... <williams@irc.chmcc.org>
Re: DNS lookups in perl (Michael Fuhr)
Does read() on sockets block? (James Marshall)
Re: fcntl to lock a file? Can this be added to the faq? <spicano@ptdcs2.intel.com>
Re: How to do this using perl? <twpierce+usenet@mail.bsd.uchicago.edu>
Re: How to peek at next line of STDIN? (repost) <tchrist@mox.perl.com>
Re: IS Perl on NT Thread Safe ? <jzawodn@cs.bgsu.edu>
Need help - just starting perl <acidik@geocities.com>
Re: Perl compiler/translator for PC (Luu Tran)
Perl program runs every other time! <TKepner@aol.com>
Re: perl script ouput from html form <TKepner@aol.com>
Re: Removing extra spaces <dbenhur@emarket.com>
Re: Removing extra spaces ("John Dallman")
Tying hash of arrays to SDBM does not work: why? <frishman@mips.biochem.mpg.de>
Re: Using exec-Why won't this work? <merlyn@stonehenge.com>
Re: Using exec-Why won't this work? <jzawodn@cs.bgsu.edu>
WebRings <roberta@cyberramp.net>
XS problem - Can't find loadable object <wade@cs.ualberta.ca>
Re: XS problem - Can't find loadable object (Michael Fuhr)
Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 08 Feb 1997 15:20:13 -0600
From: Michael Brennen <mbrennen@fni.com>
Subject: 5.003 Sys::Syslog Not Working
Message-Id: <32FCEE0D.EE5@fni.com>
I've seen that the 5.003 Sys::Syslog package is not working on both an
linux/intel and linux/alpha; I've also seen one other reference to
this. I could find no reference to this in the posted perl bugs at
<http://www.perl.com/perl/>. Are there any known fixes or workarounds?
TIA,
-- Michael
------------------------------
Date: Sat, 08 Feb 1997 21:55:58 +0000
From: Nigel Byrnes <njb@cs.bham.ac.uk>
Subject: [Q:] whitespace
Message-Id: <32FCF66E.41C6@cs.bham.ac.uk>
hi
I was wondering if anyone here could tell me how to strip out the
whitespace out of a string like the one below:
$string1 = " floor : {1,2,3,4,5};" or
$string2 = "reset : 0;"
A property worth noting is that the whitespace occurs before the colon.
Thanks very much
--
Nigel
"...just like havin' a cup of tea in the morning!"
Noel Gallagher, 1997
------------------------------
Date: 9 Feb 1997 04:45:05 GMT
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: ANNOUNCE: Net::DNS 0.03 available
Message-Id: <5djkoh$jle$1@nadine.teleport.com>
Net::DNS is a Perl module to interface with the DNS resolver. This
module is still early in the development phase, so don't rely on
it too much.
New to version 0.03 version is the ability to do zone transfers.
This version should find its way around CPAN within a few days. You
can always download the latest version from:
http://www.dimensional.com/~mfuhr/perldns/
Comments are invited. Contributed scripts are also welcome and
may be included in future releases.
--
Michael Fuhr
http://www.dimensional.com/~mfuhr/
------------------------------
Date: Sat, 08 Feb 1997 18:30:42 -0500
From: Phil Williams <williams@irc.chmcc.org>
Subject: apedding to a list...
Message-Id: <32FD0CA2.41C6@irc.chmcc.org>
Sorry for the basic question.
I want to append to a list only if the thing being appended isn't
already an element in the list.
i.e.
@junk = (@junk, $newjunk) if $newjunk not already in @junk
I can't seem to figure this one out although I know it's in this brain
somewhere!
Thanks for any help in advance
Phil
--
/*******************************************************************/
Phil Williams, Ph.D.
Research Instructor
Children's Hospital Medical Center "One man gathers what
Imaging Research Center another man spills..."
3333 Burnet Ave. -The Grateful Dead
Cincinnati, OH 45229
email: williams@irc.chmcc.org
URL: http://scuttle.chmcc.org/~williams/
/*******************************************************************/
------------------------------
Date: Sat, 8 Feb 1997 18:02:30 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: apedding to a list...
Message-Id: <m64jd5.fn.ln@localhost>
Phil Williams (williams@irc.chmcc.org) wrote:
: Phil Williams wrote:
: >
: > Sorry for the basic question.
: >
: > I want to append to a list only if the thing being appended isn't
: > already an element in the list.
: >
: > i.e.
: >
: > @junk = (@junk, $newjunk) if $newjunk not already in @junk
: >
: > I can't seem to figure this one out although I know it's in this brain
: > somewhere!
: Hate to answer my own question, but...
: I just figured out one way to do this:
: @junk = (@junk, $newjunk) if grep($newjunk, @junk) eq 0;
: Is there a better way?
Yes, for some values of 'better' ;-)
push(@junk, $newjunk) unless grep($newjunk, @junk);
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Sat, 08 Feb 1997 18:42:01 -0500
From: Phil Williams <williams@irc.chmcc.org>
Subject: Re: apedding to a list...
Message-Id: <32FD0F49.167E@irc.chmcc.org>
Phil Williams wrote:
>
> Sorry for the basic question.
>
> I want to append to a list only if the thing being appended isn't
> already an element in the list.
>
> i.e.
>
> @junk = (@junk, $newjunk) if $newjunk not already in @junk
>
> I can't seem to figure this one out although I know it's in this brain
> somewhere!
Hate to answer my own question, but...
I just figured out one way to do this:
@junk = (@junk, $newjunk) if grep($newjunk, @junk) eq 0;
Is there a better way?
Thanks again,
Phil
--
/*******************************************************************/
Phil Williams, Ph.D.
Research Instructor
Children's Hospital Medical Center "One man gathers what
Imaging Research Center another man spills..."
3333 Burnet Ave. -The Grateful Dead
Cincinnati, OH 45229
email: williams@irc.chmcc.org
URL: http://scuttle.chmcc.org/~williams/
/*******************************************************************/
------------------------------
Date: 8 Feb 1997 15:08:28 -0700
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: DNS lookups in perl
Message-Id: <5ditgs$dm6@nova.dimensional.com>
Russ Allbery <rra@cs.stanford.edu> writes:
>Michael Fuhr <mfuhr@dimensional.com> writes:
>> Russ Allbery <rra@cs.stanford.edu> writes:
[ discussion about whether Net::DNS should be entirely Perl or contain
some C ]
>Well, if you're interested in more work (heh), what would be really cool
>would be to have a nice, stable Perl implementation that doesn't change
>all *that* often but that is portable across platforms and uniform *and*
>to have a mostly C version that we could link against BIND.
I could see including an .xs file in future versions for those who
wished to link against libresolv. If I do it right, I might only
have to provide an alternate Net::DNS::Resolver and leave everything
else the same. Will give it some thought.
For now, if anybody wishes to link against libresolv, you can still
get Net::DNS 0.01 at:
http://www.dimensional.com/~mfuhr/perldns/
Version 0.01 was written mostly in C and linked against libresolv
and another library called resparse. The differences between the
C and Perl versions are internal and should be (mostly) transparent
to the programmer.
BTW, I just made Net::DNS 0.03 available at the above page; it should
find its way around CPAN within a few days. New to this version is the
ability to do zone transfers.
--
Michael Fuhr
http://www.dimensional.com/~mfuhr/
------------------------------
Date: 8 Feb 1997 20:18:32 GMT
From: jsm@nntp.best.com (James Marshall)
Subject: Does read() on sockets block?
Message-Id: <5din2o$9gf$1@nntp2.ba.best.com>
If I "read(S,$buf,$len)" on a socket, does it wait until $len bytes
have been read, the socket closes, or an error occurs? In other words,
do I need a read() loop to make sure all bytes have been read? Is
there an easier (and portable) way to do it, with fcntl() or
setsockopt() or something?
I'm writing a teaching demo in Perl, and I'd like to get it right.
I'm sure this has been asked before, but couldn't find any mention in
the FAQ or Camel book. Point me there if it's documented.
Thanks a lot,
James
............................................................................
James Marshall james@jmarshall.com San Francisco, CA @}-'-,--
"Desire for control over others stems from lack of control over oneself."
"Teach people what you know."
............................................................................
------------------------------
Date: Sat, 08 Feb 1997 13:14:08 -0800
From: Silvio Picano <spicano@ptdcs2.intel.com>
To: Matt Cline <gandalf@viman.com>
Subject: Re: fcntl to lock a file? Can this be added to the faq?
Message-Id: <32FCECA0.41C6@ptdcs2.intel.com>
Matt Cline wrote:
>
> I'm trying to use fctnl to lock a file. However, I keep on getting
> a "Bad file number" error, no matter what file number I give it.
> Does someone have some existing code using fcntl that works?
> Thanks.
>
> --
> Matthew Cline |
> gandalf@viman.com | Have you hugged your shoggoth today?
> http://www.wyattriver.com/ | Microsoft happens
[1] You lock file-handles, not files.
[2] fcntl() requires a packed structure, that is OS-dependent; use
$Config::Config{"osname"} to make this decision.
use Fcntl;
For sunos4.1.x
$flock_write_lock_rec = pack("ssllss", F_WRLCK, 0, 0, 0, 0, 0);
$flock_unlock_rec = pack("ssllss", F_UNLCK, 0, 0, 0, 0, 0);
For solaris 2.5.1
$flock_write_lock_rec = pack("ssllllllll", F_WRLCK, 0, 0, 0, 0, 0,
0, 0, 0, 0);
$flock_unlock_rec = pack("ssllllllll", F_UNLCK, 0, 0, 0, 0, 0,
0, 0, 0, 0);
For aix3.5.2
$flock_write_lock_rec = pack("ssllLii", F_WRLCK, 0, 0, 0, 0, 0, 0);
$flock_unlock_rec = pack("ssllLii", F_UNLCK, 0, 0, 0, 0, 0, 0);
[3] To lock an open file-handle (not a file):
$ret_b = fcntl($fh, liblock::F_SETLK, $flock_write_lock_rec);
[4] To unlock an open file-handle (not a file):
$ret_b = fcntl($fh, liblock::F_SETLK, $flock_unlock_rec);
[5] You'll need to add some kind of attempt/retry counters around the
fcntl()
functions if you have heavily accessed locks.
Good luck.
Silvio
------------------------------
Date: Sun, 9 Feb 1997 05:13:29 GMT
From: Tim Pierce <twpierce+usenet@mail.bsd.uchicago.edu>
Subject: Re: How to do this using perl?
Message-Id: <E5BL6H.2F4@midway.uchicago.edu>
In article <32FABCA6.372A@emarket.com>,
Devin Ben-Hur <dbenhur@emarket.com> wrote:
>Well, Tom, you are welcome to be intentionally perverse, but
>anyone who regularly works with multiple operating systems
>will avoid a fairly broad assortment of special characters in
>their filenames.
Anyone who writes production code will not depend upon the user
"avoiding" special or unusual characters in filenames. I bet you
use two-digit dates, too.
--
Support the Hawaii Equal Rights Marriage Project: call 1-900-97-MARRY ($5/call)
------------------------------
Date: 8 Feb 1997 22:07:12 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to peek at next line of STDIN? (repost)
Message-Id: <5diteg$5vg$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Randal Schwartz <merlyn@stonehenge.com> writes:
:Randal> It can't be done transparently
:Tom> Sure it can: TIEHANDLE
:
:No, I thought of that. ARGV (the filehandle in <>) cannot be
:sufficiently "smartened" using TIEHANDLE, as it would make the
:underlying magic @ARGV open-sequence disappear.
I was just thinking of the normal <FH> stuff, not ARGV, which
is already magical. Hm....
--tom
--
Tom Christiansen tchrist@perl.com
For a light heart lives long.
-- Shakespeare, "Love's Labour's Lost"
------------------------------
Date: Sun, 9 Feb 1997 00:36:11 -0500
From: "Jeremy D. Zawodny" <jzawodn@cs.bgsu.edu>
Subject: Re: IS Perl on NT Thread Safe ?
Message-Id: <Pine.SUN.3.95.970209003314.28746C-100000@hydra.cs.bgsu.edu>
On Sat, 8 Feb 1997, John Dallman wrote:
> > Is Perl on NT thread safe ?
>
> If a thread from another process runs perl.exe with a script, then if the
> script tries to do anything that tramples on work done by other threads
> of the same process, there won't be any thread safety precautions, so
> that won't be safe, but that;s not perl's fault.
Hm. And most NT-based web servers use threads to process incoming
requests. If several happen to invoke CGI scripts (written in Perl,
specifically) there could be trouble.
I've had problems with trying to restart a Netscape FastTrack 2.0 server
which is running a couple of Perl processes. Wonder if it's related...
[For clarification, I mean stopping and restarting the web service during
the time when one or more Perl processes are running which the server
invoked.]
Anyone else run into this?
Jeremy
------------------------------------------------------------------------------
<A HREF="http://www.bgsu.edu/~jzawodn">Jeremy Zawodny, jzawodn@cs.bgsu.edu</A>
Computer Science Undergraduate * Computer Consultant * Web Worker for Hire
"Argue your limitations, and they're yours." -- Richard Bach
------------------------------
Date: Sat, 08 Feb 1997 07:31:37 -0800
From: Konrad Rokicki <acidik@geocities.com>
Subject: Need help - just starting perl
Message-Id: <32FC9C59.66E0@geocities.com>
I'd like to learn Perl but I could someone help me out with my first
script? I do some html editing and my files are all named .htm. So when
I go to put them on the server I have to rename them all one by one. I'd
like to write a script to rename all the .htm files in any directory to
.html files. Here's what I have so far..
#! /usr/local/bin/perl
# htm2html - Fast multifile rename
$addl = "l";
'ls *.htm > temp001';
open (DATFILE, "temp001");
while (<STDIN>) {
if (/*.*/) {
# ^^^^^^^^^
# I'm really unsure here.. how do I extract each line from the txt file
# # and use it as a variable?
$1 = $file;
}
foreach $file
'mv $file $file+$addl';
# ^^^^^^^^^^^
# I'm confused here too..
These are the biggest problem sfor me..
Don't waste your time on the small syntax errors.. I'll figure them out
Thanks a LOT. Konrad.
------------------------------
Date: Sun, 09 Feb 97 05:40:10 GMT
From: luutran@sci.csupomona.edu (Luu Tran)
Subject: Re: Perl compiler/translator for PC
Message-Id: <5djntn$t50@netline-fddi.jpl.nasa.gov>
In article <32F95405.34@thevortex.com>, Nightshadow <nightshadow@thevortex.com> wrote:
>Does Perl exist for the dos PC? If so, where can I find a
>such a compiler/translator. Thanx and sorry for posting this, but
>I've searche high and low and just couldn't find any.
>
Yes. See http://www.activeware.com/
[cc'd by mail]
------------------------------
Date: 8 Feb 1997 05:15:38 GMT
From: "Terry Kepner" <TKepner@aol.com>
Subject: Perl program runs every other time!
Message-Id: <01bc14b5$f82d84a0$f5b700d0@tkepner.top.monad.net>
I have a strange problem. I have a script running at www.yourcalendar.com
that saves people's events in a single database. Users can search it by
keywoard, location, date, and so forth. This works just fine. Perfectly
every time. So does recording people's addresses and passwords (we get the
address info to prevent scamps from doing bad things to public listing)
The problem comes when people, like myself, try to leave a new entry. The
first time the submit button is selected, I usually get a "Server Error"
message page. Simply backing up to the previous page and reclicking the
submit button usually gets the proper result, that is, the program executes
and saves their entry to the database.
Now then, given that each instance of submit reruns the Perl program from
scratch (cookies are not used), and given that the data is unchanged
between the two instances, why the hell does it crash and burn one time and
not another? I mean, the program is presented with the exact same data
stream both times! If it failed every time I could track the problem down,
but this sometimes yes, sometimes no is driving me CRAZY.
The error log has absolutely no information, just "premature end of
headers."
What am I overlooking?
Terry
------------------------------
Date: 8 Feb 1997 04:59:58 GMT
From: "Terry Kepner" <TKepner@aol.com>
Subject: Re: perl script ouput from html form
Message-Id: <01bc14b3$c79280e0$f5b700d0@tkepner.top.monad.net>
> print MAIL "$_ '$FORM{$_}'\n" ;
Remove the "\n" from the above line, that's what tells Perl to insert the
carriage-returns. This is very, very basic Perl programming at work here.
futurecard@netstorage.com wrote in article <854771407.2331@dejanews.com>...
> foreach ( @setup_fields )
> {
> print MAIL "$_ '$FORM{$_}'\n" ;
> }
>
> The above is a section from my perl script that prints field values from
> an html form to a file. This is within a call to MAIL. When I receive
> the mail, the format of the data is a column - all the field values go
down
> the left side of the page.
>
> I would like to have the fields print out in a long string - one line
> across the page. I don't care about the length - I need it in this
format
> to feed into a dtat base program.
>
> Any solutions? I can email anyone the entire perl file if needed.
> Thanks.
> John Cervini
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
>
------------------------------
Date: Fri, 07 Feb 1997 16:43:00 -0800
From: Devin Ben-Hur <dbenhur@emarket.com>
To: Lynn Wilson <lynn@swcp.com>
Subject: Re: Removing extra spaces
Message-Id: <32FBCC14.5CEC@emarket.com>
Lynn Wilson wrote:
> How do
> I remove a variable number of spaces embedded in the middle
> of the text?
s/\s+/ /g; # \s+ means "match 1 or more whitespace"
>I'm going to use this as a key to an assocative array hoping to locate
>duplicate records. In reality the input strings will contain
>business names (ie; "Sam's Club" "Super Hardware Stores" );
In addition you should consider converting the strings to one case
and removing punctuation which is often inconsistently applied.
# orig value in $_
s/^\s+//; s/\s+$//; # trim blanks
s/\s+/ /g; # collapse white space
s/[^\w\s]//g; # eliminate non alpha-num-space
$key = "\L$_"; # convert to lower case.
HTH
--
Devin Ben-Hur <dbenhur@emarket.com>
eMarketing, Inc. http://www.emarket.com/
"Don't run away. We are your friends." O-
------------------------------
Date: Sat, 8 Feb 1997 22:17:36 GMT
From: jgd@cix.compulink.co.uk ("John Dallman")
Subject: Re: Removing extra spaces
Message-Id: <E5B1xC.C4E@cix.compulink.co.uk>
lynn@swcp.com (Lynn Wilson) asked:
> I want to remove extra spaces in a piece of text as part of
> a normalization process. I know how to remove leading and
> trailing spaces using separate regular expressions. How do
> I remove a variable number of spaces embedded in the middle
> of the text?
You need to look up some more nuances of regular expressions: the '+' and
'*' modifiers, and the letter options of s///. Try:
$input =~ s/ +/ /g;
John Dallman, jgd@cix.co.uk. A micro-FAQ on things I keep getting asked:
#!perl is at ftp://.../CPAN/ports/msdos/tips-tricks/hbp_403.zip, BigPerl
for MS-DOS can be found in CPAN via http://www.perl.com, Perl for NT/Win
95 can be found at http://www.activeware.com, with an excellent FAQ file
at http://www.endcontsw.com/people/evangelo/Perl_for_Win32_FAQ.html and
no, I don't have the slightest idea what's wrong with your CGI script.
------------------------------
Date: Sat, 08 Feb 1997 21:56:32 +0100
From: Dmitrij Frishman <frishman@mips.biochem.mpg.de>
Subject: Tying hash of arrays to SDBM does not work: why?
Message-Id: <32FCE880.41C6@mips.biochem.mpg.de>
I am trying to reproduce the SDBM example from the Camel book, p.493. It
works for simple hashes, but does not work for a hash of arrays:
#!/usr/local/bin/perl
use Fcntl;
use SDBM_File;
@Array = ( "one", "two", "three" );
tie(%hash, SDBM_File, 'Op.dbmx', O_RDWR|O_CREAT, 0644);
$hash{key} = [ @Array ];
print $hash{key}[0]," ",$hash{key}[1]," ",$hash{key}[2],"\n";
untie %hash;
This script works properly if the tie and untie lines are commented out,
i.e. for a normal hash in memory, but prints empty line if the tie amd
untie lines are activated. Why does this happen?
In general, is this approach usable for largish databases (e.g. 10000
entries, 20 lines of 60 characters each)?
I will be grateful for any help.
--
Dmitrij Frishman, PhD | Tel. +49-(0)89-8578-2664
Max-Plank-Institute for Biochemistry | Fax. +49-(0)89-8578-2655
Martinsried Institute for Protein Sequences | e-mail:
frishman@mips.biochem.mpg.de
Am Klopferspitz 18a, 82152 Martinsried, Germany | WWW:
http://www.mips.biochem.mpg.de/~frishman/
------------------------------
Date: 08 Feb 1997 21:55:15 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: "D.M. Johnson" <ez045864@peseta.ucdavis.edu>
Subject: Re: Using exec-Why won't this work?
Message-Id: <8c7mki7f4c.fsf@gadget.cscaper.com>
>>>>> "D" == D M Johnson <ez045864@peseta.ucdavis.edu> writes:
D> Alright already!!! I get the point. The reason I didn't read the man
D> page was because I had a deadline (about 30 minutes after I originally
D> posted) and I had just attempted to read the man page for perlxstut, which
D> were confusing.
You had a 30-minute deadline, and you POSTED TO USENET?
Geez, these youngsters... back when I started playing with Usenet,
every article stood a 5% chance of being lost on EACH HOP, and it
could take days, even weeks to get from one host to another. Postings
were actual *articles*, not just some little BBS-style questions.
People *composed* them. rn(1) had to invoke a *separate text editor*,
and it *took a while*.
The thought of posting to Usenet for something you needed an answer
for in Domino's style just wouldn't have occurred to any of us.
And that's probably a good thing.
Just waxing nostalgic...
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 569 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Sun, 9 Feb 1997 00:42:30 -0500
From: "Jeremy D. Zawodny" <jzawodn@cs.bgsu.edu>
Subject: Re: Using exec-Why won't this work?
Message-Id: <Pine.SUN.3.95.970209003910.28746E-100000@hydra.cs.bgsu.edu>
On 8 Feb 1997, Randal Schwartz wrote:
> You had a 30-minute deadline, and you POSTED TO USENET?
Stranger things have happened. ;-)
> The thought of posting to Usenet for something you needed an answer
> for in Domino's style just wouldn't have occurred to any of us.
>
> And that's probably a good thing.
I'd change the "probably" to a probability of about 99.9%. ;-)
Even 5 years ago, when I started, it was waaaayyy different. That's life,
I guess. I also remember when the web wasn't full of ADs, enormous 24bit
graphics, background sounds, Java animations (which add no value to the
content), and didn't take forever to navigate.
Hm... This could go on for quite a while (or at least *I* could). I guess
I should just shut-up and go back to working on the Perl script I
mentioned in alt.hackers recently...
Jeremy
------------------------------------------------------------------------------
<A HREF="http://www.bgsu.edu/~jzawodn">Jeremy Zawodny, jzawodn@cs.bgsu.edu</A>
Computer Science Undergraduate * Computer Consultant * Web Worker for Hire
"Argue your limitations, and they're yours." -- Richard Bach
------------------------------
Date: Sat, 08 Feb 1997 11:52:18 -0600
From: Robert Aldridge <roberta@cyberramp.net>
Subject: WebRings
Message-Id: <32FCBD4F.2277@cyberramp.net>
Does anybody know of a webring CGI out there that is public domain?
If not, How difficult will this type of script be to develop?
I'd love to use webring.org, but they have been very unstable lately.
Robert
Head Pilot at http://webflier.com/
------------------------------
Date: 08 Feb 1997 21:15:40 -0700
From: Wade Holst <wade@cs.ualberta.ca>
Subject: XS problem - Can't find loadable object
Message-Id: <r7iv42k42b.fsf@sunchild.cs.ualberta.ca>
I am experimenting with the XS tutorial (xstut). Following alone with
example one, I run across an error when I try to execute the script - it
complains about not being able find a loadable object.
Below is the sequence of commands I performed, and the output (with some
spaces for readability). Help with this problem would be greatly appreciated.
---
sunchild% h2xs -A -n Mytest
Writing Mytest/Mytest.pm
Writing Mytest/Mytest.xs
Writing Mytest/Makefile.PL
Writing Mytest/test.pl
Writing Mytest/Changes
Writing Mytest/MANIFEST
sunchild% perl5 Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Mytest
sunchild% make
cp Mytest.pm ./blib/lib/Mytest.pm
/usr/local/perl/bin/perl -I/usr/local/perl/lib/sun4-sunos/5.003 -I/usr/local/perl/lib /usr/local/perl/lib/ExtUtils/xsubpp -typemap /usr/local/perl/lib/ExtUtils/typemap Mytest.xs >Mytest.tc && mv Mytest.tc Mytest.c
Please specify prototyping behavior for Mytest.xs (see perlxs manual)
gcc -c -I/usr/local/include -I/usr/gnu/include -O -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fpic -I/usr/local/perl/lib/sun4-sunos/5.003/CORE Mytest.c
Running Mkbootstrap for Mytest ()
chmod 644 Mytest.bs
LD_RUN_PATH="" ld -o blib/arch/auto/Mytest/Mytest.so -assert nodefinitions -L/usr/local/lib -L/usr/gnu/lib Mytest.o
chmod 755 blib/arch/auto/Mytest/Mytest.so
cp Mytest.bs ./blib/arch/auto/Mytest/Mytest.bs
chmod 644 blib/arch/auto/Mytest/Mytest.bs
Manifying ./blib/man3/Mytest.3
# After making a 'hello' script as described in the tutorial
sunchild% hello
Can't find loadable object for module Mytest in @INC (./blib . /usr/dapp3/grad/wade/root/lib/Perl /usr/dapp3/grad/wade/.r/dnd/src /usr/dapp3/grad/wade/root/lib/perl5 /usr/dapp3/grad/wade/Research/DTF/DTF/Exec /usr/dapp3/grad/wade/Programs/Languages/Perl5/Tk400.200/blib/arch /usr/dapp3/grad/wade/Programs/Languages/Perl5/Tk400.200/blib/lib /usr/dapp3/grad/wade/.r/tigl/Src/Perl/Mytest/blib/arch/auto /usr/local/perl/lib/sun4-sunos/5.003 /usr/local/perl/lib /usr/local/perl/lib/site_perl/sun4-sunos /usr/local/perl/lib/site_perl .) at Mytest.pm line 18
BEGIN failed--compilation aborted at hello line 5.
sunchild% ls
Changes Makefile.PL Mytest.o blib/ test.pl
MANIFEST Mytest.bs Mytest.pm hello*
Makefile Mytest.c Mytest.xs pm_to_blib
sunchild% perl5 -V
Summary of my perl5 (5.0 patchlevel 3 subversion 0) configuration:
Platform:
osname=sunos, osver=4.1.4, archname=sun4-sunos
uname='sunos sunkay 4.1.4 5 sun4m '
hint=recommended, useposix=true, d_sigaction=define
Compiler:
cc='gcc', optimize='-O', gccversion=2.7.2
cppflags='-I/usr/local/include -I/usr/gnu/include'
ccflags ='-I/usr/local/include -I/usr/gnu/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=y, randbits=31
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib -L/usr/gnu/lib'
libpth=/usr/local/lib /usr/gnu/lib /lib /usr/lib /usr/ucblib
libs=-ldbm -ldl -lm -lc -lposix
libc=/lib/libc.so.1.9, so=so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=, ccdlflags=' '
cccdlflags='-fpic', lddlflags='-assert nodefinitions -L/usr/local/lib -L/usr/gnu/lib'
@INC: . /usr/dapp3/grad/wade/root/lib/Perl /usr/dapp3/grad/wade/.r/dnd/src /usr/dapp3/grad/wade/root/lib/perl5 /usr/dapp3/grad/wade/Research/DTF/DTF/Exec /usr/dapp3/grad/wade/Programs/Languages/Perl5/Tk400.200/blib/arch /usr/dapp3/grad/wade/Programs/Languages/Perl5/Tk400.200/blib/lib /usr/dapp3/grad/wade/.r/tigl/Src/Perl/Mytest/blib/arch/auto /usr/local/perl/lib/sun4-sunos/5.003 /usr/local/perl/lib /usr/local/perl/lib/site_perl/sun4-sunos /usr/local/perl/lib/site_perl .
sunchild% uname -a
SunOS sunchild 4.1.4 1 sun4m
---
P.S.
same type of error occurs for 'perl5 test.pl'
P.P.S.
The diagnostic error message:
Can't find loadable object for module %s in @INC (%s)
does not appear in the 'perldiag' documentation - am I misreading something?
Wade
------------------------------
Date: 8 Feb 1997 23:15:41 -0700
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: XS problem - Can't find loadable object
Message-Id: <5djq2d$l8e@nova.dimensional.com>
[ cc to author ]
Wade Holst <wade@cs.ualberta.ca> writes:
>I am experimenting with the XS tutorial (xstut). Following alone with
>example one, I run across an error when I try to execute the script - it
>complains about not being able find a loadable object.
-snip-
>Can't find loadable object for module Mytest in @INC (./blib ...)
-snip-
> same type of error occurs for 'perl5 test.pl'
You can run test.pl by executing "make test". If you do, you should
get something like this:
% make test
PERL_DL_NONLAZY=1 /usr/bin/perl5 -I./blib/arch -I./blib/lib ...
Notice that it's including ./blib/arch and ./blib/lib when running
the test. Following the perlxstut manpage, you probably put this
in your script:
use lib './blib';
Change it to this:
use lib qw(./blib/arch ./blib/lib);
Then it should work. Hope this helps.
--
Michael Fuhr
http://www.dimensional.com/~mfuhr/
------------------------------
Date: 8 Jan 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Jan 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.
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 V7 Issue 917
*************************************