[19984] in Perl-Users-Digest
Perl-Users Digest, Issue: 2179 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 22 06:05:30 2001
Date: Thu, 22 Nov 2001 03:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1006427108-v10-i2179@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 22 Nov 2001 Volume: 10 Number: 2179
Today's topics:
Re: .htaccess with Perl <jon_rew@nospam.learn-it.demon.co.uk>
Re: .htaccess with Perl <jon_rew@nospam.learn-it.demon.co.uk>
Re: About @INC contents - help, please <Peter.Dintelmann@dresdner-bank.com>
Re: About @INC contents - help, please <bernard.el-hagin@lido-tech.net>
Re: About @INC contents - help, please nobull@mail.com
be root <m.pfeffer@ppmedia.at>
Re: be root <Tassilo.Parseval@post.rwth-aachen.de>
Re: be root <bernard.el-hagin@lido-tech.net>
Re: be root <mgjv@tradingpost.com.au>
Re: Capture stdout from subs nobull@mail.com
Re: Chat? <spamhater@keepyourfilthyspamtoyourself.co.uk>
Re: Creating a Perl app. Help with installation? (Rafael Garcia-Suarez)
Re: Do Not Redirect CGI Questions To CIWAC (Helgi Briem)
Fastest way to eliminate words < 4 characters long exce (Bob)
Re: File locking question (Anno Siegel)
Re: File upload in Internet Explorer using Perl (Nitin Ghai)
Re: How to split variable length row (Helgi Briem)
Re: I would like to call the perl from java (Helgi Briem)
Re: IO::Select and IO::Socket question: multiple connec <zoltan.kandi@tellabs.com>
mod_perl Q <neil@thump.org>
mod_perl Q <neil@thump.org>
Re: MX records. nobull@mail.com
Re: Newbie module problem (Perry Wheeler)
Re: replacing CGI.pm delete() (Rafael Garcia-Suarez)
Re: replacing CGI.pm delete() (Helgi Briem)
Thread Question <rss@idiom.com>
Re: variable scope <s_grazzini@hotmail.com>
Re: Which ISPs support perl scripts? (Bob)
XML::Parser, DBI and unicode <nat@DONTSPAMPLEASEc2i.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 22 Nov 2001 08:59:19 -0000
From: "Jonathan Rew" <jon_rew@nospam.learn-it.demon.co.uk>
Subject: Re: .htaccess with Perl
Message-Id: <1006419611.18839.0.nnrp-02.c2def305@news.demon.co.uk>
"Ronald Nelson" <rknelson26@hotmail.com> wrote in message
news:3bfc0fde$0$22582$4c41069e@reader1.ash.ops.us.uu.net...
> You want to know how to setup a password protected web site using
.htaccess?
> What exactly is your question, its a bit confusing.
>
I have already used .htaccess to set up a username and password for a part
of the website and now want to be able to access it using Perl.
> "Tony Curtis" <tony_curtis32@yahoo.com> wrote in message
> news:87pu6cgdpb.fsf@limey.hpcc.uh.edu...
> > >> On Wed, 21 Nov 2001 18:32:55 -0000,
> > >> "Jonathan Rew" <jon_rew@nospam.learn-it.demon.co.uk> said:
> >
> > > Hi I have set up a password protected directory on my
> > > site and want to use Perl to gain access to it. The
> > > Website is on an Apache server and I have already set up
> > > the username and password. Is there any way that I can
> > > do it?
> >
> > LWP::UserAgent
> >
> > hth
> > t
> > --
> > Oh! I've said too much. Smithers, use the amnesia ray.
>
>
------------------------------
Date: Thu, 22 Nov 2001 08:59:59 -0000
From: "Jonathan Rew" <jon_rew@nospam.learn-it.demon.co.uk>
Subject: Re: .htaccess with Perl
Message-Id: <1006419612.18839.1.nnrp-02.c2def305@news.demon.co.uk>
"Tony Curtis" <tony_curtis32@yahoo.com> wrote in message
news:87pu6cgdpb.fsf@limey.hpcc.uh.edu...
> >> On Wed, 21 Nov 2001 18:32:55 -0000,
> >> "Jonathan Rew" <jon_rew@nospam.learn-it.demon.co.uk> said:
>
> > Hi I have set up a password protected directory on my
> > site and want to use Perl to gain access to it. The
> > Website is on an Apache server and I have already set up
> > the username and password. Is there any way that I can
> > do it?
>
> LWP::UserAgent
>
> hth
> t
> --
> Oh! I've said too much. Smithers, use the amnesia ray.
Thanks for your concise reply.
--
Jon Rew
------------------------------
Date: Thu, 22 Nov 2001 08:58:41 +0100
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: About @INC contents - help, please
Message-Id: <9tiaj8$bje2@news-1.bank.dresdner.net>
Hi,
"Andrew Sergievskiy" <seas@sandy.ru> schrieb im Newsbeitrag
news:9tgnug$2da3$1@news.kis.ru...
> I am trying to install modules DBI, DBD to access Sybase database.
> The feature is that I cannot install modules on their place and have to
> place them in my home dir (my system is Solaris).
>
> I made it compile DBI (Makefile.PL and then make) - it said 'completed',
and
what about "make install"?
> even compiled something (it really executed all cc without errors).
>
> I am trying to install DBD::Sybase, It wants @INC points to DBI module and
I
> cannot do this, because all this is in my home. How to change this fucking
> variable?
it is not fucking, it is in the documentation. First install the
modules in your desired directory (using the LIB parameter for
Makefile.PL).
You may then extend @INC by setting the PERL5LIB environment
variable (export PERL5LIB=/first/add/inc/path:/second/add/inc/path
and so on).
HTH,
Peter Dintelmann
------------------------------
Date: 22 Nov 2001 08:39:53 GMT
From: Bernard El-Hagin <bernard.el-hagin@lido-tech.net>
Subject: Re: About @INC contents - help, please
Message-Id: <slrn9vphdg.qsr.bernard.el-hagin@gdndev25.lido-tech>
On Wed, 21 Nov 2001 20:26:47 +0300, Andrew Sergievskiy <seas@sandy.ru> wrote:
> Hi, All!
>
> I need you help.
> I am trying to install modules DBI, DBD to access Sybase database.
> The feature is that I cannot install modules on their place and have to
> place them in my home dir (my system is Solaris).
>
> I made it compile DBI (Makefile.PL and then make) - it said 'completed', and
> even compiled something (it really executed all cc without errors).
>
> I am trying to install DBD::Sybase, It wants @INC points to DBI module and I
> cannot do this, because all this is in my home. How to change this fucking
> variable?
I don't think it's actually a *fucking* variable. At least it's not
documented as such.
> Can anybody help me? - I am not advanced user, I only need to access my
> Sybase database.
You can help yourself by looking in the wonderful documentation that
came with your Perl. Your question is answered in the FAQ:
"How do I keep my own module/library directory?"
You could have found it in 4 seconds by typing:
perldoc -q module
And hitting the SPACE bar a couple of times. Much faster than posting
to a newsgroup and waiting over 25 hours for a reply.
Cheers,
Bernard
------------------------------
Date: 22 Nov 2001 01:16:01 -0800
From: nobull@mail.com
Subject: Re: About @INC contents - help, please
Message-Id: <4dafc536.0111220116.6ea6827e@posting.google.com>
"Andrew Sergievskiy" <seas@sandy.ru> wrote in message news:<9tgnug$2da3$1@news.kis.ru>...
> I am trying to install DBD::Sybase, It wants @INC points to DBI module and I
> cannot do this, because all this is in my home. How to change this fucking
> variable?
Please see the entry for the @INC variable in the standard Perl
documentation file describing special variables (perlvar) or see the
answer to your question when it appears in the FAQ as "How do I keep
my own module/library directory?".
In general if you have a question about a Perl module/function/special
variable please see the documentation for that module/function/special
variable first.
If that doesn't help try the FAQ.
Only then should you post to Usenet.
------------------------------
Date: Thu, 22 Nov 2001 11:19:47 +0100
From: Martin Pfeffer <m.pfeffer@ppmedia.at>
Subject: be root
Message-Id: <n8kpvtcl8smr6a6vf9csltk3s2nfg8iha0@4ax.com>
hi
Is there a way to execute a linux command as root from a cgi script
Thanx
Martin
------------------------------
Date: Thu, 22 Nov 2001 11:25:53 +0100
From: "Tassilo v. Parseval" <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: be root
Message-Id: <9tijrh$m4h$05$1@news.t-online.com>
On Thu, 22 Nov 2001 11:19:47 +0100, Martin Pfeffer wrote:
> hi
> Is there a way to execute a linux command as root from a cgi script
> Thanx
> Martin
Yes, either let your CGI-script run as root (this equals a bullet that
you shot yourself in your head, UNIXly speaking) or use sudo, a program
that allows users to execute programs under UID==0. sudo needs the user
password for that which can by passed via stdin using the -s switch.
One problem however: a webserver and the corresponding CGI-script most
often run as nobody or something alike and so aren't really
user-accounts. You, however, could create a special useraccount with
minimal privileges and configure sudo to allow certain root-commands for
this user.
By the way: This is highly off-topic. The term 'Perl' (or 'perl') did
not even occur once in your post.
Tassilo
--
"My assistants had a hard time. I was Mr. Capricious, Mr. Whimsical Chen."
- Iron Chef Chen Kenichi, Iron Chef Chinese
------------------------------
Date: 22 Nov 2001 10:34:14 GMT
From: Bernard El-Hagin <bernard.el-hagin@lido-tech.net>
Subject: Re: be root
Message-Id: <slrn9vpo3r.qsr.bernard.el-hagin@gdndev25.lido-tech>
On Thu, 22 Nov 2001 11:19:47 +0100, Martin Pfeffer <m.pfeffer@ppmedia.at>
wrote:
> hi
> Is there a way to execute a linux command as root from a cgi script
Yes.
And what is your Perl question?
Cheers,
Bernard
------------------------------
Date: Thu, 22 Nov 2001 21:41:43 +1100
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: be root
Message-Id: <slrn9vplj7.to2.mgjv@martien.heliotrope.home>
On Thu, 22 Nov 2001 11:19:47 +0100,
Martin Pfeffer <m.pfeffer@ppmedia.at> wrote:
> hi
> Is there a way to execute a linux command as root from a cgi script
Yes, but it's a terribly bad idea.
And your Perl question is?
Please ask CGI and HTTP server questions on one of the
comp.infosystems.www.* groups, and ask linux specific questions on a
linux group.
Martien
--
Do not pay any attention to what Godzilla says. It is a troll, and has
no decent working knowledge of Perl or programming in general. Search
groups.google.com to see a history of its posts and replies to these posts.
------------------------------
Date: 22 Nov 2001 01:21:06 -0800
From: nobull@mail.com
Subject: Re: Capture stdout from subs
Message-Id: <4dafc536.0111220121.25f8ccfe@posting.google.com>
"Marco Guazzone" <sguazt@infodrome.net> wrote in message news:<9tgl11$ncc$1@serv1.iunet.it>...
> suppose you have a package with a method that write
> some text to stdout
> Now suppose you have another package that want to
> capture output produced by Writer->write() and store
> it into memory;
> I thought of using 'pipes'...
> But it is very inefficient (due to fork(), pipe,...).
> So anyone has a better solution ?
IO::Scalar
------------------------------
Date: Thu, 22 Nov 2001 10:11:05 GMT
From: Alan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk>
Subject: Re: Chat?
Message-Id: <9e5c5add4a.spamhater@keepyourfilthyspamtoyourself.co.uk>
In message <9t3oak$en9c$1@as201.hinet.hr>
"Wanadoo" <jarulekgh@wanadoo.fr> wrote:
> Hi!!!!!!
> I wonder if is possible to make chat using HTML and Perl. Do I have to
> know socket programming??
Yes, it's not difficult to do this at all. The code to implement a chat
facility, using Perl on the server and Javascript on the client, that
looks very similar to an instant messenger client is surprisingly
trivial. It doesn't require socket programming since all the data is
transferred via HTTP in the same way as standard Web pages. I wrote such
a system a few months ago for a dating agency and it has worked fairly
faultlessly ever since. Basically chat messages are placed in a
temporary file on the server and fetched at regular intervals by the
client. I tried at first to achieve real-time chat by having a wait loop
on the server that delivered chat to a waiting frame on the browser the
moment it arrived, but that caused a lot of problems and I replaced it
with a 15-second timed fetch loop on the client. In practice most users
are unaware of the delay.
Alan
------------------------------
Date: 22 Nov 2001 09:47:53 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Creating a Perl app. Help with installation?
Message-Id: <slrn9vpifq.juh.rgarciasuarez@rafael.kazibao.net>
brian d foy wrote in comp.lang.perl.misc:
>
> Here are some starting resources:
>
> http://www.perldoc.com/perl5.6.1/bin/h2xs.html
> http://www.perldoc.com/perl5.6.1/lib/ExtUtils/MakeMaker.html
Also an article "Building Perl projects with MakeMaker" :
http://www-106.ibm.com/developerworks/linux/library/l-make.html
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Thu, 22 Nov 2001 10:56:34 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: Do Not Redirect CGI Questions To CIWAC
Message-Id: <3bfcd9c4.3029802636@News.CIS.DFN.DE>
On Wed, 21 Nov 2001 07:24:04 -0800, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote:
>Which reminds me, over in CIWAC, should I continue referring
>to you as Sheila King, or should I call you Martien? If you
>like I will refer to you using your real name, Frank.
>
Are you off your medication again, Kira?
Regards,
Helgi Briem
------------------------------
Date: Thu, 22 Nov 2001 00:40:02 -0800
From: null@null.com (Bob)
Subject: Fastest way to eliminate words < 4 characters long except month abbreviations?
Message-Id: <null-2211010040020001@user161.lwpw-01.cwia.com>
I wrote a search engine script which only indexes words of 4 characters or
more or the 3 character month abbreviation of the time stamp in order to
reduce the size of the index. For simplicity the script only returns
results which match all search terms. Because of the last feature I have
to remove all search terms of 3 characters or less excepting monthly
abbreviations or that search will not return any results. I am currently
using this regex to accomplish this:
@searchterms = ($userinput =~
m/\w{4,}|\d+|jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/g);
My impression as a perl newbie is that regex's are very slow and I suspect
that this particular regex is extremely slow. The only other way of doing
this that I can think of is to use a foreach loop to search through every
month and I have no idea if this would actually be faster. Any advice on
which of the two methods I have mentioned is fastest or describing a third
and faster method would be appreciated.
------------------------------
Date: 22 Nov 2001 10:46:30 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: File locking question
Message-Id: <9til26$nn7$1@mamenchi.zrz.TU-Berlin.DE>
According to Laocoon <Laocoon@eudoramail.com>:
> *snip*
> > Why are you reading the whole file at once? There is no reason.
>
> I like it better that way..
That's no reason to recommend it to others. It is *not* the standard
method of dealing with files. It is only reasonable under two conditions:
a) There must be an advantage over line-wise reading.
b) The files to be read must be small enough to fit into memory in
all anticipated applications of the program.
In this case, there is no advantage at all, and we know nothing about
the intended applications. So file slurping is wrong.
Anno
------------------------------
Date: 22 Nov 2001 00:57:16 -0800
From: ghainitin@yahoo.com (Nitin Ghai)
Subject: Re: File upload in Internet Explorer using Perl
Message-Id: <e9ed9a28.0111220057.13070dc3@posting.google.com>
efflandt@xnet.com (David Efflandt) wrote in message news:<slrn9vo6fq.1ds.efflandt@typhoon.xnet.com>...
> On 20 Nov 2001 22:56:36 -0800, Nitin Ghai <ghainitin@yahoo.com> wrote:
> > Hi,
> > In our applcation we are using the file upload utility of Perl. The
> > files are uploaded to a UNIX server and the application is located on
> > another server.
> > We are having problems in calculating the size of the file in IE, the
> > same code is working in NN4.7. But when we try to calculate the file
> > size using -s($filename), it is giving "" as size for all the files in
> > IE(as it is not able to access the file; 'fileexists' option returns
> > "" in IE, while in NN the same command returns 1 , thus the
> > conclusion!).
> > Can anyone please throw some light on this
> > Thanks in Advance
> > Nitin
>
> Assuming you are using CGI.pm to handle the file upload (since you mention
> browser problems), if you save the file as the uploaded filename, are you
> properly stripping the path prefix (if it exists) from that name?
> Browsers might, or might not, put a local path prefix on the filename.
>
> But it is very unclear which part of the puzzle you are discussing here,
> the upload script, the undisclosed application on another server and its
> unknown communication method, or some sort of browser side scripting.
> Or are you attempting to redirect a POST method (which can be
> problematic)?
Hi,
thanks a lot for the response. I've tried with both stripping and
non-stripping the prefix in the file path. It didn't work. The exact
problem is as follows:
We are trying to upload files(from a local machine) to a remote
server. Note that the application's code is on a unix server, and the
files are NOT uploaded to the same server, BUT to a different server.
In the process of uploading, after we do the uploading, we are trying
to calculate the size of the file (by '$filesize = -s \*$file'
command), so that if it zero, to throw an error.
But the above command gives the no. of bytes in the file, when we run
that from NN, while it's returning "" when we run it from IE. All the
options of viz. -s, -e, -r are also returning "" in IE (so, I
understand, it's not able to recognize the file itself, as the -e
option itself returns ""). Is this some security issue with IE, as
it's trying to find the size of the file which is on a different
server? If you have some idea, pls. explain...
Thanks,
Santosh.
------------------------------
Date: Thu, 22 Nov 2001 10:54:14 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: How to split variable length row
Message-Id: <3bfcd918.3029630488@News.CIS.DFN.DE>
On Wed, 21 Nov 2001 17:52:11 +0100, "Steffen Müller"
<5l259r001@sneakemail.com> wrote:
>"John Smith" <nospam@newsranger.com> schrieb im Newsbeitrag
>news:UtPK7.32928$xS6.56092@www.newsranger.com...
>| Thank you guys for the solution.
>| I have to learn a lot.
>
>A simple rule of thumb would be:
>If you have a simple assumption like "Doing xyz like *this* will work" (or
>vice versa), test it (especially before posting it to a newsgroup).
>Never expect Perl to behave a certain way. Perl will surprise you many times
>with useful but unexpected results because in Perl, *magic* does exist (and
>I am not joking).
>But sometimes you can really think of Perl as a thick-headed Camel.
I can second that, but I also recommend keeping a
directory with all your tests, giving them mnemonic
names. They surprisingly often come in handy later
for real things.
Regards,
Helgi Briem
------------------------------
Date: Thu, 22 Nov 2001 10:42:17 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: I would like to call the perl from java
Message-Id: <3bfcd64e.3028916101@News.CIS.DFN.DE>
On Fri, 16 Nov 2001 00:13:42 GMT, JOSE <DOBLEJ@teleline.es>
wrote:
>I would like to call the perl function from java.
>How?
Ask somebody who does java how to make
a system call. Then do it like that. This
question is off-topic form this newsgroup.
Regards,
Helgi Briem
------------------------------
Date: Thu, 22 Nov 2001 08:29:53 GMT
From: Zoltan Kandi <zoltan.kandi@tellabs.com>
Subject: Re: IO::Select and IO::Socket question: multiple connections
Message-Id: <3BFCC494.18D2436E@tellabs.com>
Hi,
Mina Naguib wrote:
>
[snip]
>
> I'm having a very hard time understanding your question.
>
> You've already demonstrated you know how to write clients/servers in perl.
>
> It also seems you have the logic figured out (Your application will connect
> to 20 perl-based services on different machines).
>
> What's the problem ? Also logically speaking, it might be better to have the
> 20 perl-based services initiate the connection to your program and not
> vice-versa.
I did not say that the services on the remote machines are Perl-based.
Sorry if I confused you, in my original posting I just showed a simple
test script (the second one) which I ran on several remotes
- in the meantime from other remotes different telnet sessions were
started towards the "host" -
to check if my approach is correct. Well, it has been correct so far.
> You said """Since the NMS application on all 20 NT machines is
> running as a service, it's not capable of setting up the necessary TCP/IP
> connection towards my application""" Why is that ?
In fact, the services on the remotes are part of our proprietary telecom
NMS. They may be approached via a standard Telnet connection to obtain
the necessary alarm info - this is what I try to automate - and I may
not modify them.
Chris mentioned the Expect module or Net::Telnet. I will look at the
first one. I tried Net::Telnet but I could not figure out how to set up
this type of connection as well.
Best regards,
Zoltan Kandi, M. Sc.
Product & Application Specialist
Tellabs Netherlands BV
Perkinsbaan 17
3439 ND Nieuwegein
Tel: +31 30 600 40 75
Fax: +31 30 600 40 90
GSM: +31 651 194 291
Email: Zoltan.Kandi@tellabs.com
Internet: http://www.tellabs.com
------------------------------
Date: Thu, 22 Nov 2001 10:17:33 +0000
From: Neil <neil@thump.org>
Subject: mod_perl Q
Message-Id: <uND8O3lJITEf=pUvXg+qT1ngDPVI@4ax.com>
Getting this error with a static compiled apache with mod_perl
Apache.pm failed to load!. ... (yes I've read the FAQs, and spent 2 hours at
least on google etc trying to find an answer.)
And doing a strace bin/httpd -X reveals:
-- snip --
ory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/lib/Constants.so", 0xbfffd0bc) = -1 ENOENT (No such file or directory)
stat("/lib/Constants.so", 0xbfffd0bc) = -1 ENOENT (No such file or directory)
stat("/lib/libConstants.so", 0xbfffd0bc) = -1 ENOENT (No such file or directory)
stat("/lib/Constants", 0xbfffd0bc) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0
stat("/usr/lib/Constants.so", 0xbfffd0bc) = -1 ENOENT (No such file or directory
)
stat("/usr/lib/Constants.so", 0xbfffd0bc) = -1 ENOENT (No such file or directory
)
stat("/usr/lib/libConstants.so", 0xbfffd0bc) = -1 ENOENT (No such file or direct
ory)
stat("/usr/lib/Constants", 0xbfffd0bc) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.00503/i586-linux/Carp.pm", O_RDONLY) = -1 ENOENT (No such
-- snip --
Where does Constants.so fit in ? Its not compiled up with mod-perl distribution
?
TIA
Neil-
------------------------------
Date: Thu, 22 Nov 2001 10:07:25 +0000
From: Neil <neil@thump.org>
Subject: mod_perl Q
Message-Id: <5s38O=MqNPFL4Pf8p4xTRHXaZQ5s@4ax.com>
Getting this error with a static compiled apache with mod_perl
Apache.pm failed to load!. ... (yes I've read the FAQs, and spent 2 hours at
least on google etc trying to find an answer.)
And doing a strace bin/httpd -X reveals:
-- snip --
ory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/lib/Constants.so", 0xbfffd0bc) = -1 ENOENT (No such file or directory)
stat("/lib/Constants.so", 0xbfffd0bc) = -1 ENOENT (No such file or directory)
stat("/lib/libConstants.so", 0xbfffd0bc) = -1 ENOENT (No such file or directory)
stat("/lib/Constants", 0xbfffd0bc) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0
stat("/usr/lib/Constants.so", 0xbfffd0bc) = -1 ENOENT (No such file or directory
)
stat("/usr/lib/Constants.so", 0xbfffd0bc) = -1 ENOENT (No such file or directory
)
stat("/usr/lib/libConstants.so", 0xbfffd0bc) = -1 ENOENT (No such file or direct
ory)
stat("/usr/lib/Constants", 0xbfffd0bc) = -1 ENOENT (No such file or directory)
open("/usr/lib/perl5/5.00503/i586-linux/Carp.pm", O_RDONLY) = -1 ENOENT (No such
-- snip --
Where does Constants.so fit in ? Its not compiled up with mod-perl distribution
?
TIA
Neil-
------------------------------
Date: 22 Nov 2001 01:34:58 -0800
From: nobull@mail.com
Subject: Re: MX records.
Message-Id: <4dafc536.0111220134.5485217f@posting.google.com>
"RJHM van den Bergh" <rvdb@comweb.nl> wrote in message news:<tvl9eclft74mf0@corp.supernews.com>...
> How do I determine the MX record of a domain with Perl on NT servers.
There may be an OS-specific way for NT, alternatively you could use a
pure Perl implementation of the DNS client. You can find one in the
usual place (see FAQ "What modules and extensions are available for
Perl?...")
> The problem is the user only does have an account with a Perl but he can't
> install things on the server.
So the user can only run scripts provided by the server admins, he
can't install his own. In that case he's onto a looser. Perhaps you
are really trying to ask "How do I keep my own module/library
directory?"
> I'm not that familiar with Perl only some simple CGI script writing.
I don't understand. What language are you writing those GCI scripts
in? Python? Java? Bourne shell? If you have been writing CGI
scripts in some other langauage what relevance does this information
have to the matter in hand?
------------------------------
Date: 22 Nov 2001 01:20:54 -0800
From: pwheeler@kentports.org (Perry Wheeler)
Subject: Re: Newbie module problem
Message-Id: <ab5c4b00.0111220120.4ab2f854@posting.google.com>
Simon Oliver <simon.oliver@umist.ac.uk> wrote in message news:<3BFBBFE8.D15E1D9B@umist.ac.uk>...
> Make your scheduled job use the same version of perl by editing the
> shebang. This should fix all your problems.
Arrghhh....
I said I was new to this but why didn't I think of that....? It just
didn't occur to me that the damn thing could be running differing
versions of perl, I didn't even know I had two versions of the thing!
I thought I'd upgraded rather than done a seperate install.
So yes.... Thank you for your help with this, it now works perfectly.
Cheers
Perry W
------------------------------
Date: 22 Nov 2001 09:45:42 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: replacing CGI.pm delete()
Message-Id: <slrn9vpibl.juh.rgarciasuarez@rafael.kazibao.net>
Jason Gray wrote in comp.lang.perl.misc:
> Is there anything I can replace the CGI.pm's delete() method with?
>
> $q->delete('next_lot');
>
> ^ what can i replace that with if im not using cgi.pm, splice?
You question does not make much sense.
If you don't use CGI.pm (probably a bad idea;-) why would you need the
functionality provided by a method that operates on the internal state
of a CGI object?
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Thu, 22 Nov 2001 10:45:49 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: replacing CGI.pm delete()
Message-Id: <3bfcd70c.3029106475@News.CIS.DFN.DE>
On Thu, 22 Nov 2001 00:51:14 -0600, "Jason Gray"
<perl@cableone.net> wrote:
>Is there anything I can replace the CGI.pm's delete() method with?
>
>$q->delete('next_lot');
>
>^ what can i replace that with if im not using cgi.pm, splice?
If you're not using CGI.pm, you should be.
Don't try to reinvent the wheel. It's a bumpy
ride and everybody passes you on the freeway.
Regards,
Helgi Briem
------------------------------
Date: 22 Nov 2001 08:08:39 GMT
From: "Richard S. Smith" <rss@idiom.com>
Subject: Thread Question
Message-Id: <9tibq7$2d9h$1@news.idiom.com>
I know that threads (both the 5.005 and 5.6 versions) are considered
experimental and unstable, but I have a project that's such a perfect
candidate (a distributed state-based build system that will run
primarly under Solaris but also include other Unixen and NT/W2K) and I
really don't want to use the old fork/signal methods if I can "get
away" with using threads.
So my question is, do people who use Perl to do real work actually use
threaded Perl in it's current state, and if so, can someone please
point me to some working "cookbook" examples to help me get going?
Thanks, as always.
PS: I actually asked a similar question here about five years ago and
the answer was "threads are coming, be patient". *grin*
PPS: If the answer is still "no", any pointers at all would be
appreciated, as long as they don't involve writing a full-blown
threaded daemon in C++ because I sure as hell ain't going there.
Thanks.
--
-----------------------------------------------------------------------
Richard S. Smith / Email: rss@idiom.com / Web: http://www.rssnet.org/
-----------------------------------------------------------------------
------------------------------
Date: Thu, 22 Nov 2001 08:52:02 GMT
From: "Steve Grazzini" <s_grazzini@hotmail.com>
Subject: Re: variable scope
Message-Id: <S03L7.125925$n5.15621079@typhoon.nyc.rr.com>
"Andrew Hamm" <ahamm@programmer.net> wrote in message
news:3bfca2ac$1_1@news.iprimus.com.au...
> Joe Schaefer wrote in message ...
[..]
> >> my @rows = (1, 2, 3);
> >> my $row = 1;
> >> foreach my $x (@rows) {
> >> my $x = 2;
> >> print "$x\n";
> >> }
> >>
> >> print join(" ", @rows), "\n";
> >>
> >> Then you'll still smash the contents of @rows. $x IS the current
> >> element of @rows. It is _not_ a copy of the current element.
> >>
> >> Does that make sense?
> >
> >Not really- I expect @rows to be (1, 2, 3) in the final print
> >statement. Are you suggesting it's not?
> >
> EXACTLY! It will print 2 2 2. Matt's problem is confusing in two ways.
He's
[..]
>
> Anyway, getting back to Matts original problem of the (2,2,2) array, it's
> because the foreach variable IS, or represents, or stands in for, or
shares
> with, or is an ALIAS of (proper language) the CURRENT VALUE in the list
> being looped over.
[..]
Wait... 'my $x = 2' is going to touch the array?
^^
Maybe there was a typing mistake after all... ;)
-Steve
------------------------------
Date: Thu, 22 Nov 2001 02:29:59 -0800
From: null@null.com (Bob)
Subject: Re: Which ISPs support perl scripts?
Message-Id: <null-2211010229590001@user125.lwpw-01.cwia.com>
In article <9t4duk$f9k$1@news8.svr.pol.co.uk>, "Chris Clarke"
<mad-biker@couplands-well.freeserve.co.uk> wrote:
> As an absolute perl beginner... how do I find an ISP which supports perl
> scripts? I am currently with Freeserve, and the ISP would have to be free.
No one lets you run perl scripts for free. Deal with it.
------------------------------
Date: Thu, 22 Nov 2001 10:37:47 GMT
From: Natanael Copa <nat@DONTSPAMPLEASEc2i.net>
Subject: XML::Parser, DBI and unicode
Message-Id: <%z4L7.2819$N77.25097@news.world-online.no>
Hi!
I have data in an XML file that I'm inserting in an mysql database using
DBI. The problem is that one field has to be in latin1 and not in unicode.
I use Unicode::String to convert to latin.
my $u = Unicode::String::utf8($line_from_xml);
when I 'print $u->latin1;' it displays correctly but when I insert in mysql
it doesn't. the chars (for example é) are show as two byte's. Thats is
not what I want.
my $sql = "INSERT INTO tbl_name (col) VALUES
(".$dbh->qoute($line_from_xml).")";
my $u = Unicode::String::utf8($sql);
$dbh->do($u->latin1);
I wonder why 'print $u->latin1' works and not '$dbh->do($u->latin1)'???
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.
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 V10 Issue 2179
***************************************