[11730] in Perl-Users-Digest
Perl-Users Digest, Issue: 5329 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 8 13:07:31 1999
Date: Thu, 8 Apr 99 10:00:26 -0700
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, 8 Apr 1999 Volume: 8 Number: 5329
Today's topics:
Re: =~tr / / /; problem (Steve Vertigan)
Re: Active perl / Win98 and Apache <edson@usa.net>
Re: Active State 5.09 Perl processes hanging under NT 4 (Daniel Beckham)
Re: Active State 5.09 Perl processes hanging under NT 4 <cassell@mail.cor.epa.gov>
Adding to @INC <scott.ranzal@mci.com>
Re: Advanced Mailform script wanted! (I R A Aggie)
Re: Advanced Mailform script wanted! (Jonathan Stowe)
Re: better way to write this script ? (Tad McClellan)
Re: better way to write this script ? (Daniel Beckham)
Re: Chicago.pm meeting (Randal L. Schwartz)
Re: convert IP to country of origin (brian d foy)
Re: convert IP to country of origin <bwebb@fred.net>
Re: determining the browser? (Randal L. Schwartz)
Re: determining the browser? (John Stanley)
Re: Directory traversing (Jonathan Stowe)
Re: Dyn-IP "wanna be" 1-liner <emschwar@rmi.net>
Executing app in win32 cwidhelm@arcmail.com
help me I'm a new Perl User!!! <jnedham@hotmail.com>
Re: help me I'm a new Perl User!!! <jeff@co.mendocino.ca.us>
Help with foxbase .dbf file open <jslutzk@uswest.com>
Help with Perl return value 134 (Pete McNab)
Re: How to close all file descriptors ? (Jonathan Stowe)
Re: How to load modules that use dynamic libraries <tye@metronet.com>
Re: minimal pattern matching (Tad McClellan)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 08 Apr 1999 15:57:17 GMT
From: vertigan@bigfoot.com (Steve Vertigan)
Subject: Re: =~tr / / /; problem
Message-Id: <370dd105.365764070@news.aurum.net.au>
lr@hpl.hp.com (Larry Rosler) wrote thus:
>Not only newbies. Also people who answer questions on this list. But
>maybe those sets aren't as disjoint as they should be. :-)
D00D! NOT 2 BE P3DANTIC BUT C.L.P.M IS A K-RAD BBOARD!!11! IF YOU H4VE
MOZILLA U CAN POST TO IT THROUGH THE WEB IN YOUR HTML EMAIL!!!1
Also who are you people and how did you get into my computer?
--Steve
------------------------------
Date: Thu, 8 Apr 1999 17:19:37 +0100
From: "Edson Medina" <edson@usa.net>
Subject: Re: Active perl / Win98 and Apache
Message-Id: <923588349.112509@nurn.esoterica.pt>
are you using
#!c:\perl\bin\perl.exe
in your scripts?
------------------------------
Date: Thu, 08 Apr 1999 16:45:39 GMT
From: danbeck@qual.net (Daniel Beckham)
Subject: Re: Active State 5.09 Perl processes hanging under NT 4.0
Message-Id: <7eij4n$pc@nnrp4.farm.idt.net>
Better yet, ditch Netscape and pickup a copy of Apache for Win32. I run it at
work and it works beautifully.
Even better still, ditch NT and get a unix box with apache perl and php.
=)
In article <370BFB4D.4A9F@Go-Baltimore.com>, Raven513
<Ravens@Go-Baltimore.com> wrote:
>Bill Morgan wrote:
>>
>> I just installed Active State Perl 5.09 under NT 4.0. We are running lots of
>> Perl CGI scripts from our web server, which is Netscape Enterprise v3.6. It
>> looks like some of the processes are hanging around after the scripts finish,
>> because every day when I look at the NT task manager, there are 20 or 30
>> Perl.exe processes in there that don't go away and are soaking up resources.
>> All of our Perl scripts have explicit "exit" statements in them when they
>> finish, so I'm not sure what is causing this. Has anyone else experienced
>> this problem? Please email any replies as well as posting to this group.
>> Thanks!
>>
>> ---------------------------------------------------------------------------
>> William E. Morgan NAVAL SURFACE WARFARE CENTER
>> Code N84 email: wmorgan@nswc.navy.mil
>> 17320 Dahlgren Rd. phone: (540)653-6088
>> Dahlgren, VA 22448 fax: (540)653-1810
>
>
>Get the Service Pack for Netscape Enterprise Server (v3.6.1). Seems
>that the folks at Netscape had a problem with CGI processes hanging on
>NT when the browser was closed before the process completed.
>
>Raven513
------------------------------
Date: Thu, 08 Apr 1999 09:34:06 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Active State 5.09 Perl processes hanging under NT 4.0
Message-Id: <370CDA7E.DEE452C1@mail.cor.epa.gov>
Daniel Beckham wrote:
>
> Better yet, ditch Netscape and pickup a copy of Apache for Win32. I run it at
> work and it works beautifully.
>
> Even better still, ditch NT and get a unix box with apache perl and php.
>
> =)
I think you misspelled 'linux' there. :-)
> In article <370BFB4D.4A9F@Go-Baltimore.com>, Raven513
> <Ravens@Go-Baltimore.com> wrote:
> >Bill Morgan wrote:
> >>
> >> I just installed Active State Perl 5.09 under NT 4.0. We are running lots of
> >> Perl CGI scripts from our web server, which is Netscape Enterprise v3.6. It
> >> looks like some of the processes are hanging around after the scripts finish,
> >> because every day when I look at the NT task manager, there are 20 or 30
> >> Perl.exe processes in there that don't go away and are soaking up resources.
> >> All of our Perl scripts have explicit "exit" statements in them when they
> >> finish, so I'm not sure what is causing this. Has anyone else experienced
> >> this problem? Please email any replies as well as posting to this group.
> >> Thanks!
> >>
> >> ---------------------------------------------------------------------------
> >> William E. Morgan NAVAL SURFACE WARFARE CENTER
> >> Code N84 email: wmorgan@nswc.navy.mil
> >> 17320 Dahlgren Rd. phone: (540)653-6088
> >> Dahlgren, VA 22448 fax: (540)653-1810
> >
> >
> >Get the Service Pack for Netscape Enterprise Server (v3.6.1). Seems
> >that the folks at Netscape had a problem with CGI processes hanging on
> >NT when the browser was closed before the process completed.
> >
> >Raven513
HTH,
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Thu, 08 Apr 1999 16:29:21 GMT
From: "Scott Ranzal" <scott.ranzal@mci.com>
Subject: Adding to @INC
Message-Id: <BP4P2.6047$XV6.52413@PM01NEWS>
Issue:
I would like to add to the directories that have been established for
searching for Perl libraries. I am currently doing the additions within the
scripts, but have several directories that I would like to add on a full
time basis for every script.
Is there a way to do this ?
Scott Ranzal
scott.ranzal@mci.com
------------------------------
Date: 8 Apr 1999 15:28:00 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Advanced Mailform script wanted!
Message-Id: <slrn7gpisr.ld7.fl_aggie@stat.fsu.edu>
On Thu, 08 Apr 1999 16:32:40 +0200, Kati Gdbler
<katigaebler@hotmail.com> wrote:
+ I DID mention shareware, although I have noticed that many perl
+ programmers (good or bad) are primarely money driven and willing to lend
+ their expertise to deep pocketed clients only.
Ummm...Hello, McFly, Hello? Have you _ever read_ this newsgroup? do
you know what happens here? do you realize that most of advice and
expertise being lent around here is being done for _free_?
I don't about anyone else, but I'm highly insulted by your
generalization. My advice (freely given, mind you): go away and
come back as a different account in about 6 months.
James
------------------------------
Date: Thu, 08 Apr 1999 15:43:46 GMT
From: gellyfish@gellyfish.com (Jonathan Stowe)
Subject: Re: Advanced Mailform script wanted!
Message-Id: <370ccb48.27491625@news.dircon.co.uk>
On Thu, 08 Apr 1999 16:32:40 +0200, Kati Gdbler
<katigaebler@hotmail.com> wrote:
>Jonathan Stowe wrote:
>>
>> On Thu, 08 Apr 1999 13:16:03 +0200, Kati Gdbler
>> <katigaebler@hotmail.com> wrote:
>>
>> >Hello,
>> >
>> >I am looking for a mailform processor that includes the following
>> >features:
>>
>> Hold it right there.
>>
>> Check out:
>> <http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&q=mailform>
>>
>> This newsgroup is not the place to look for free software.
>>
>
>I didn't know that its a criteria for posting on this newsgroup (or that
>comp.lang.perl.misc is a job hunting newsgroup). Just in case it counts:
>I DID mention shareware, although I have noticed that many perl
>programmers (good or bad) are primarely money driven and willing to lend
>their expertise to deep pocketed clients only. I did NOT mention (as I
>generally don't make money offers directly on newgroups), that in case a
>perl hacker turns up a similar program that could be modified to suit
>the purpose I would also be happy to pay for their work.
>
You seem to have mistook my point - which is that this newsgroup is
concerned with the perl programming language and those issues
surrounding its use as a programming language - it is not generally
the best resource for those who are looking to obtain (rather than
write ) software. I pointed you toward a more suitable resource where
can be found software of all sorts - where you could actually look for
what you want.
Your characterization of Perl programmers as greedy is obviously based
on a very limited experience of this newsgroup - there are many people
here who devote hours a week ( a day even in some cases ) to helping
others for nothing with their *programming problems* - but will draw a
line at helping people with their *procurement* or for that matter any
part of their other work for nothing. Let me reiterate - this group
is concerned with the Perl programming language not products.
Anyhow *plonk*
/J\
------------------------------
Date: Thu, 8 Apr 1999 11:27:17 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: better way to write this script ?
Message-Id: <lshie7.c41.ln@magna.metronet.com>
Mike Mckinney (mike@mike.local.net) wrote:
: I'm just getting started again with Perl, and am trying to write a simple
: script to calculate some formulas for me. What I was hoping is that some
: people here on the newsgroup could give me some pointers on trimming the
: script down, or just improving the style a bit.
: Also, I'm having a problem with the <<here document, in that I can't seem to
: get rid of the last newline, so that the users input is on the same line as
: the final : .
Then don't use a here-doc, use a "normal" quoted string instead.
: If posting entire programs to the newsgroup is frowned upon, I apologize in
: advance, and will certainly refrain from doing so in the future if this is the
: case.
: #!/usr/bin/perl -w
: use diagnostics;
use strict; # eat your vegatables, it's good for you (*especially
# if you are just learning Perl)
: # Simple program to calculate proportional band, authority, or % outside air
: # being delivered to a given area.
: # Still need to add a function for graphing the reset schedule to check
: # controller calibration
: {
: print <<End_Of_Options;
: Calculate: (P)roportional band, (T)hrottling range, (A)uthority,
: (V)entilation, or (Q)uit :
: End_Of_Options
# same as above sans the trailing newline:
print 'Calculate: (P)roportional band, (T)hrottling range, (A)uthority,
(V)entilation, or (Q)uit : ';
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 08 Apr 1999 17:42:50 GMT
From: danbeck@qual.net (Daniel Beckham)
Subject: Re: better way to write this script ?
Message-Id: <7eimfv$u0@nnrp4.farm.idt.net>
Well, an easy way to fix the <<HERE problem is:
print <<End_Of_Options;
Calculate: (P)roportional band, (T)hrottling range, (A)uthority,
End_Of_Optipns
print "(V)entilation, or (Q)uit :";
Easy eh? Just take off that last line and use a regular print statement.
It's not the most elequent way maybe... but it's the obvious way to correct
the problem. (KISS)
The <<HERE notations sucks anyway. It's great for large amounts of text, but
it totally screws up your indentation for large scripts. You have everything
formatted and perfectly easy to read, then you plop a <<HERE block in the
middle and you end up with a crappy looking script.
I prefer beauty and brawn...
Daniel
------------------------------
Date: 08 Apr 1999 08:48:19 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Chicago.pm meeting
Message-Id: <m1r9pv15bw.fsf@halfdome.holdit.com>
>>>>> "Jim" == Jim Allenspach <jima@MCS.COM> writes:
Jim> The Chicago PM chapter will be having its next meeting on Monday,
Jim> April 19, at the offices of American Information Systems (161 N. Clark,
Jim> suite 1350), starting at 7:30 PM. Information on the group or on how to
Jim> get to the meeting can be found at the group's Website,
Jim> http://chicago.pm.org/ .
And I must add that the Chicago.pm is a nice bunch of folks, having
not only hosted me to give one of my "Just Another Convicted Perl
Hacker" talks in Chicago, but also raising enough money to defray a
substantial portion of my out-of-pocket costs for doing so. And they
bought me lunch. Great group. Thanks a lot!
print "Just another Convicted Perl hacker,"
--
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@teleport.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: Thu, 08 Apr 1999 12:46:54 -0400
From: brian@pm.org (brian d foy)
Subject: Re: convert IP to country of origin
Message-Id: <brian-ya02408000R0804991246540001@news.panix.com>
In article <370BDDAB.E2457FE7@synopsys.com>, baliga@synopsys.com posted:
> IP address has nothing to do with the country or any other place. The IP adress
> doesnot
> encapsulate the country name within it...
not as a standard it doesn't, but you can tell who is assigned
which IP blocks. Netscape does this to track where their 128 bit
software goes :)
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Thu, 8 Apr 1999 12:41:34 -0400
From: "Robert E Webb" <bwebb@fred.net>
Subject: Re: convert IP to country of origin
Message-Id: <I_4P2.300$G4.329487@news.abs.net>
IANA the (former?) governing body of IP addresses has set aside IP address
ranges for APNIC (Asia-Pacific), RIPE (Europe), and ARIN (North America), so
you may be able to tell from these ranges. But, of course, its not perfect.
Multi-national companies tend to use the IP address range of their home
country. Look at IANA.org, I believe they have a table of address ranges
that are set aside for each registry.
That's about as close as you will get.
I don't know of any perl scripts, but you may want to check out an
application called Visual Route. It's a GUI trace-route utility with some
pretty cool features. It attempt to locate the IP address origin through
finger I believe, and then displays the location on a world map. Very nice
tool.
HTH
Bob/
<nguyen.van@imvi.bls.com> wrote in message
news:7eg8g3$gnk$1@nnrp1.dejanews.com...
> Hello everyone,
>
> I just wonder there is any way to convert IP address to country of origin.
Is
> there any perl script to do that. Please give me some hints. By the way,
is
> there any company doing this kind of work ? Please give me some names of
> companies.
>
> Thanks
> Van Nguyen
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 08 Apr 1999 08:44:17 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: determining the browser?
Message-Id: <m1u2ur15im.fsf@halfdome.holdit.com>
>>>>> "George" == George <fred222@mauimail.com> writes:
George> Actually I was thinking of doing something completely
George> text-based as an option for it, to accomodate both Lynx
George> browsers and low-bandwidth connects, but I am loath to venture
George> away from the beautiful GUI stuff I've been doing. Not that I
George> don't like lynx, I've used it before for some time and it's
George> some fun schtuff ;)
You apparently fail to understand that there are other browsers (including
text browsers) that understand tables just fine that aren't "the big two".
I'm thinking in particular of w3-mode for GNU emacs, that handles
tables just fine.
Please stop trying to control *layout* with HTML. Think of *meaning*
instead, and let the reader's tools determine layout.
It's not "beautiful" if I can't render it meaningfully. Stop forcing
things down my throat.
print "Just another Perl hacker and web-whacker,"
--
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@teleport.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: 8 Apr 1999 16:31:47 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: determining the browser?
Message-Id: <7eillj$a31$1@news.NERO.NET>
In article <fred222-ya023580000704992234420001@news.bellatlantic.net>,
George <fred222@mauimail.com> wrote:
>And no, Mr. Lynx, I don't want you at my site! ;-)
>
>Actually I was thinking of doing something completely text-based as an
>option for it, to accomodate both Lynx browsers and low-bandwidth connects,
>but I am loath to venture away from the beautiful GUI stuff I've been
>doing.
Is your goal to communicate or show the world how much fancy crap you
can put on your web page? If it is the latter, I hope you are not
programming for a commercial operation, because you are going to cost
your company money and customers.
------------------------------
Date: Thu, 08 Apr 1999 15:03:37 GMT
From: gellyfish@gellyfish.com (Jonathan Stowe)
Subject: Re: Directory traversing
Message-Id: <370cc504.25887430@news.dircon.co.uk>
On Thu, 08 Apr 1999 07:45:52 -0700, Aaron Dickinson
<adickinson@barr.com> wrote:
>I am working on a PERL script that does global search and replace on an
>NT system... unfortunately I do not know how to get it to follow the
>subdirectories under the location the program executes from.
>
>Can someone provide a code example for this?
>
>
The documentation for the module File::Find can ...
P:\>perldoc File::Find
/J\
------------------------------
Date: 08 Apr 1999 10:21:16 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Dyn-IP "wanna be" 1-liner
Message-Id: <xkfemlv84n7.fsf@valdemar.col.hp.com>
dragons@scescape.net (Matthew Bafford) writes:
> 7 Apr 1999 22:25:17 GMT -- Andrew Allen <ada@fc.hp.com>:
> -> map{/([1-9]\d*\.\d+\.\d+\.\d+)/}grep{/ppp/}map{split/s+/}
> ->
> -> with something like
> ->
> -> /ppp[^s]*([1-9]\d*(?:\.\d+){3})/g
> ->
> -> (or maybe the 'ppp' is after, I don't know--are you really splitting
> -> on the letter 's'???). I guess these suggestions yield:
>
> perldoc perlre
>
> The \s is any whitespace.
Yes, but take another look at that split. 'tain't no \s in there
anywhere.
-=Eric
------------------------------
Date: Thu, 08 Apr 1999 15:05:29 GMT
From: cwidhelm@arcmail.com
Subject: Executing app in win32
Message-Id: <7eigjj$c3j$1@nnrp1.dejanews.com>
I am in the process of writing a cgi that when invoked will launch an
application on the server side to perform an operation. I am sending a system
call as follows
system( '<path><application name><application parameters>' );
After sending the system call the browser just hangs. Any suggestions on how
to remedy this problem?
Chris
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 8 Apr 1999 14:45:13 GMT
From: "James Nedham" <jnedham@hotmail.com>
Subject: help me I'm a new Perl User!!!
Message-Id: <01be81ce$68b74580$9d7cf3a9@loniw40267>
My boss has asked me to wright a perl script that:
a) asks someone what program they would like to run
b) asks them where they would like to display it
It is meant as a little 'time waster' excercise but no matter how much I
look though the Perl books I cannot work it out.
I would like a menu to be shown and upon making a selection the user to be
asked where to display it.
Please help!!!
------------------------------
Date: Thu, 8 Apr 1999 08:26:00 -0700
From: "Jeff Kirk" <jeff@co.mendocino.ca.us>
Subject: Re: help me I'm a new Perl User!!!
Message-Id: <7eii0d$vi2$1@ultra.sonic.net>
Well, let's see. I assume you are on some type of UNIX box. Perhaps in a X
Windows environment. You ask to have the script display the program in s
specific place. Would this be another monitor? Seriously if you want
someone to help, you need to supply better information...
James Nedham <jnedham@hotmail.com> wrote in message
news:01be81ce$68b74580$9d7cf3a9@loniw40267...
> My boss has asked me to wright a perl script that:
>
> a) asks someone what program they would like to run
> b) asks them where they would like to display it
>
> It is meant as a little 'time waster' excercise but no matter how much I
> look though the Perl books I cannot work it out.
>
> I would like a menu to be shown and upon making a selection the user to be
> asked where to display it.
>
> Please help!!!
------------------------------
Date: Thu, 08 Apr 1999 11:39:50 -0500
From: Jeff Slutzky <jslutzk@uswest.com>
Subject: Help with foxbase .dbf file open
Message-Id: <370CDBD6.8BE7B3DD@uswest.com>
This is a multi-part message in MIME format.
--------------1A98AA20D65DE996D6BD65EB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Can some point me in the direction of some comprehensive documentation
on writing to foxbase .dbf files using XBase on a SCO 5.0 operating
system.
Jeff Slutzky
--------------1A98AA20D65DE996D6BD65EB
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jeff Slutzky
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Jeff Slutzky
n: Slutzky;Jeff
org: HP-USS
adr: 1299 Farnam St.;;Room 400;Omaha;NE;68102;USA
email;internet: jslutzk@uswest.com
title: UNIX Systems Administrator
tel;work: 402-422-5778
tel;fax: 402-422-7774
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard
--------------1A98AA20D65DE996D6BD65EB--
------------------------------
Date: 8 Apr 1999 15:37:12 GMT
From: stillers@slip-3.slip.net (Pete McNab)
Subject: Help with Perl return value 134
Message-Id: <slrn7gpj98.3gu.stillers@slip-3.slip.net>
Morning.
We are having some trouble with a perl script that aborts in a
non-repeatable fashion with the following text:
Error: Runtime exception^M
[1] + Done (134) ?^M
188 Abort perl^M
The second numerical error (188) is different every time the error
occurs. This error is happening on a perl script called by the
MKS shell on an Alpha-NT.
If anyone can point me towards what this error indicates, or even
an online resource for perl errors I would be most appreciative.
The perl.com documents have proven to be not particularly useful
for this, and my web searches haven't turned up anything of
value.
Thanks.
Pete
--
------------------------------------------------------------------
Pete McNab | Steelers List Web Page:
pete@mcnab.org |
stillers@slip.net | http://www.slip.net/~stillers/steelers-list
------------------------------
Date: Thu, 08 Apr 1999 16:01:14 GMT
From: gellyfish@gellyfish.com (Jonathan Stowe)
Subject: Re: How to close all file descriptors ?
Message-Id: <370cd208.29219621@news.dircon.co.uk>
On Thu, 08 Apr 1999 14:44:22 GMT, raymondj@removethis.raleigh.ibm.com
(RJ) wrote:
>On 7 Apr 1999 22:08:51 GMT, abigail@fnx.com (Abigail) wrote:
>
>Reread the original question.
>You can not exit and then fork a new process!
>
>>RJ (raymondj@removethis.raleigh.ibm.com) wrote on MMXLV September
>>MCMXCIII in <URL:news:370cc7b1.24538875@mdnews.btv.ibm.com>:
>>^^
>>^^ Question: How in perl can you close all file handles?
>>
>>
>>exit;
>>
>>
>>
I think *you* ought to reread the original question and *then* as a
supplementary bonus read the documentation. exiting the program is
the only way to close all open filehandles without knowing the name of
each one and doing close() on each one individually.
/J\
------------------------------
Date: 8 Apr 1999 11:23:10 -0500
From: Tye McQueen <tye@metronet.com>
Subject: Re: How to load modules that use dynamic libraries
Message-Id: <7eil5e$od1@fumnix.metronet.com>
"Bjvrn Medin" <ekabjm@eka.ericsson.se> writes:
)
) I am coding a module that uses a dynamic library. I have tried both XS
) and SWIG but they both complain about the same thing. I have no
) problems building the thing but when I try
) to load it I fail with an error like this:
)
) DB<1> use admin;
) Can't load './admin.so' for module admin: ld.so.1: /usr/bin/perl: fatal:
) relocation error: symbol not found: ciSys: referenced in ./admin.so at
) /opt/perl/lib/5.00502/sun4-solaris/DynaLoader.pm line 168, <IN> chunk 1.
[...]
) libprim.so (containing sybmol ciSys etc).
It looks like you have a version of Unix where dependancies on
shared libraries are only tracked for executables, not for other
shared libraries. That is, if you build an executable, you can
tell Unix that, when that executable is loaded, it needs to
automatically load libprim.so to resolve symbols like ciSys.
But there is no way to tell your Unix to automatically load
libprim.so when admin.so is loaded.
One solution I've managed on occasion is to rebuild the perl
executable so that it depends on libprim.so, even though it
doesn't use any symbols from it.
Another solution is to build your admin.so using the static
library, libprim.a, though this will cause problems if you
want to build more than one extension that uses libprim.
It might be possible to specify that admin.so be loaded with
"lazy" symbol resolution then call a routine in admin.so that
doesn't depend on libprim.so and that loads libprim.so.
More likely, you could tell Perl to load libprim.so before it
loads admin.so. Doing a quick search in lib/pod finds you can
add a "BOOT:" section to your *.xs file to do this. You could
also do this before calling C<bootstrap> in your *.pm file. See
lib/Dynaloader.pm for hints on how to load some shared library
from Perl code. See ext/DynaLoader/DynaLoader.xs in the Perl
source code distribution to see which C routines you can use
for this in your "BOOT:" section.
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: Thu, 8 Apr 1999 09:59:45 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: minimal pattern matching
Message-Id: <hocie7.ls.ln@magna.metronet.com>
sstarre@my-dejanews.com wrote:
: In article <slrn7ghbgd.7mp.sholden@pgrad.cs.usyd.edu.au>,
: sholden@cs.usyd.edu.au wrote:
: > On Mon, 05 Apr 1999 12:13:00 GMT, sstarre@my-dejanews.com wrote:
: > >
: > >
: > >Methinks that s/// needs another switch. I'm trying to locate all instances
: of
: > >strings surrounded by a delimiter in a string, such as
: >
: > Is there any reason you couldn't have tried any of those options before
: > posting here. It only took me two minutes, hope posting was worth the wait...
: . Honestly, if its SOOOOO difficult to reply without adding
: in complaints, why bother?
In the hopes that reasking of Frequently Asked Questions
would become less frequent, perhaps?
How does this sound:
"Honestly, if all you are going to do about my taking cuts in
line is to complain about it, why bother?"
??
Pretty silly, I'd imagine.
If a person doesn't _know_ that they are supposed to wait
their turn in line, then everbody else just lets them do it?
I don't think so. They point out that going to the front is
not how it works...
You are not likely to be able to convince society to give up
on the "standing in line" rule, so attempting such is yet
another waste of time (your time this time instead of others
time).
You either stand in line, or take whatever heat society
issues for not conforming.
: Two minutes for someone who already knew the answer.
But Sam's two minutes isn't the only component in the accounting.
Add 20 seconds for each reader to determine that you are
reasking a question that has been answered hundreds of
times before.
Assuming only 5000 clpmisc readers, that is over 27 *hours*
of time wasted on a question that has already been answered!
But that is for only one reasked FAQ. There are 20-50 a day of
those in this newsgroup.
That's over 500 hours *a day* wasted on questions that have
already been answered.
But that is for only one day. There are 365 days in a year,
so this community spends only 182,500 hours a year doing
stuff that has already been done.
This is Not Good.
: What a surprize! Put
: yourself in the poster's position for a change.
If the FAQ entry is not easily findable, then complaints about
reasking them should not be made.
But when the poster uses the exact word needed to find the
answer in their problem statement (e.g. "greedy"), we know
that they just want someone else to have to do the simple
word search for them.
Takes 10 seconds at the most to go search for "greedy" in the
9 FAQ files.
Do it yourself, you may get the answer in 10 seconds!
: At least I read the book and
: tried cases myself before posting.
But the very first place to look, before books, before the
WWW, before Usenet, is the words of the people who
built the perl that you are using.
These are the standard Perl docs.
They are *included* with the perl distribution.
If you have a properly installed perl, then they are already
on your hard disk somewhere. Find out where.
: As for the FAQs that you so fondly refer, I
: get broken links more often than assistance.
Sounds like you try to browse the FAQs on the WWW.
No wonder you don't want to do it. It would take several minutes
to do a word search over 9 FAQ files that way.
So don't use such an inefficient method.
Access the local docs on your HD.
: The insults and slurs I can do without.
Then stop taking cuts.
-------------------------------------------------------------------
In article <1995Nov9.193745.13694@netlabs.com>, lwall@netlabs.com (Larry
Wall) wrote: ...
<Larry> [snip] I view a programming language as a place to be
<Larry> explored, like Disneyland. You don't need to have a lot of preparation
<Larry> to explore a theme park. You do have to go along with the crowd
<Larry> control measures, though. In a sense, each ride has its own
<Larry> prerequisites--if you cut in line, you risk getting tossed out of the
<Larry> park.
<Larry>
<Larry> What we have here in this newsgroup is a failure in crowd control.
<Larry> Reading the FAQ is like staying in line--it's something you should
<Larry> learn in kindergarten. Usenet needs a better kindergarten.
-------------------------------------------------------------------
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 5329
**************************************