[30417] in Perl-Users-Digest
Perl-Users Digest, Issue: 1660 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 20 09:10:09 2008
Date: Fri, 20 Jun 2008 06:09:28 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 20 Jun 2008 Volume: 11 Number: 1660
Today's topics:
Re: [regex] grep for chars in any order <someone@example.com>
Re: [regex] grep for chars in any order <benkasminbullock@gmail.com>
Re: calling external program tiff2pdf <npc@zomg.tk>
Re: cockroach race: grep for characters in any order <mritty@gmail.com>
Does sleep increase server load? <jwcarlton@gmail.com>
Re: Does sleep increase server load? <glex_no-spam@qwest-spam-no.invalid>
Re: Does sleep increase server load? <tzz@lifelogs.com>
Re: Does sleep increase server load? <jwcarlton@gmail.com>
Re: Does sleep increase server load? xhoster@gmail.com
Re: extract all hotmail email addresses in a file and s <rvtol+news@isolution.nl>
Re: extract all hotmail email addresses in a file and s <pfiland@mindspring.com>
Re: extract all hotmail email addresses in a file and s <cbfalconer@yahoo.com>
Re: extract all hotmail email addresses in a file and s <m@rtij.nl.invlalid>
Re: FAQ 8.2 How come exec() doesn't return? <dalessio@motorola.NOSPAM.com>
Re: FAQ 8.2 How come exec() doesn't return? <bill@ts1000.us>
I need help running DBI <rodbass63@gmail.com>
Re: I need help running DBI <ben@morrow.me.uk>
Re: Learning Perl <allergic-to-spam@no-spam-allowed.org>
Re: Learning Perl <allergic-to-spam@no-spam-allowed.org>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 19 Jun 2008 16:57:15 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: [regex] grep for chars in any order
Message-Id: <Ldw6k.151$2G6.105@edtnps83>
viki wrote:
> How can I build regex that matches all characters of the string $STR
> in any order with .* added between any two characters: ?
> And without generating all N! transpositions (where N is length of
> $STR) ?
> Example.
> For $STR "abc", I want to match equivalent to:
> /(a.*b.*c)|(a.*c.*b)|(b.*a.*c)|(b.*c.*a)|(c.*a.*b)|(c.*b.*a)/
>
> Generating all transpositions is not feasible for larger legths of
> $STR.
> /[abc].*[abc].*[abc]/ is easy and fast but gives false positives.
> What is good solution ?
I haven't tested this but this may do what you want:
( Assuming the data you are searching is in $data )
$data =~ s/[^\Q$STR\E]+//g;
print "matched!\n" if join( '', sort split //, $data ) eq join( '', sort
split //, $STR );
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
------------------------------
Date: Thu, 19 Jun 2008 23:17:29 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: [regex] grep for chars in any order
Message-Id: <g3epe9$o1i$1@ml.accsnet.ne.jp>
On Thu, 19 Jun 2008 16:57:15 +0000, John W. Krahn wrote:
> ( Assuming the data you are searching is in $data )
>
> $data =~ s/[^\Q$STR\E]+//g;
> print "matched!\n" if join( '', sort split //, $data ) eq join( '',
sort
> split //, $STR );
This fails (gives a false negative) if $data = "abcabc" and $STR = "ab",
because the result of the first "join" is "aabb" and the second "join" is
"ab". You need to do some kind of unique sort.
------------------------------
Date: Thu, 19 Jun 2008 22:27:36 +0200 (CEST)
From: James muffin <npc@zomg.tk>
Subject: Re: calling external program tiff2pdf
Message-Id: <g3effo$2an$1@aioe.org>
> Hi
>
> I cut and pasted. The solution is you need to give a list as I
> mentioned earlier.
Its not though, I've never done that(given a list), and using the code
you posted it works for me. Something else is up...
I used this as the full program:
my $filename="fred.tiff";
my $newfile="john.pdf";
system ("tiff2pdf -o $newfile $filename");
worked just fine.
------------------------------
Date: Thu, 19 Jun 2008 06:54:34 -0700 (PDT)
From: Paul Lalli <mritty@gmail.com>
Subject: Re: cockroach race: grep for characters in any order
Message-Id: <1b0a8504-9603-48a9-9d2b-7c216365a070@y21g2000hsf.googlegroups.com>
On Jun 19, 8:10=A0am, Ben Bullock <benkasminbull...@gmail.com> wrote:
> Following on from the discussion about finding all of a set of
> characters in a string, here is a "cockroach race" I've made to see
> which solution is faster. I ran this on Perl 5.10, so you might get
> different results with some other version.
[...]
> However, second place is not so clear. Despite what Bart Lateur
> thought, there is no difference between the performance of the
> anchored and unanchored regexes (j_b and j_b2 above). The solution I
> posed initially fails badly on a long input string. The regex solution
> posted by Glenn Jackman fails particularly badly on a long list of
> characters, because of the O(n^2) size of the regex. However, the
> thing I initially posted does miles better with a long input string,
> coming a close second.
Added lalli_idx to use index() rather than pattern matches in my
suggestion (and corrected the j_b/j_b2 typo):
sub lalli_idx
{
my ($s, @chars) =3D @_;
return all { index($s, $_) !=3D -1 } @chars;
}
Running on 5.8.4 for solaris:
Rate bullock lalli jackman lalli_idx j_b2
j_b j_index
bullock 14599/s -- -15% -23% -76% -78%
-78% -85%
lalli 17212/s 18% -- -9% -71% -74%
-74% -82%
jackman 19011/s 30% 10% -- -68% -71%
-72% -81%
lalli_idx 60241/s 313% 250% 217% -- -8%
-10% -39%
j_b2 65789/s 351% 282% 246% 9% --
-2% -33%
j_b 67114/s 360% 290% 253% 11% 2%
-- -32%
j_index 98039/s 572% 470% 416% 63% 49%
46% --
Rate jackman bullock lalli j_b lalli_idx
j_b2 j_index
jackman 17452/s -- -2% -13% -67% -72%
-74% -85%
bullock 17857/s 2% -- -11% -66% -71%
-73% -84%
lalli 20040/s 15% 12% -- -62% -67%
-70% -83%
j_b 52910/s 203% 196% 164% -- -14%
-21% -54%
lalli_idx 61350/s 252% 244% 206% 16% --
-9% -47%
j_b2 67114/s 285% 276% 235% 27% 9%
-- -42%
j_index 114943/s 559% 544% 474% 117% 87%
71% --
Rate jackman j_b lalli j_b2 bullock
lalli_idx j_index
jackman 1200/s -- -94% -94% -95% -96%
-97% -98%
j_b 20877/s 1640% -- -2% -6% -37%
-39% -57%
lalli 21322/s 1677% 2% -- -4% -36%
-38% -56%
j_b2 22321/s 1760% 7% 5% -- -33%
-35% -54%
bullock 33223/s 2669% 59% 56% 49% --
-4% -31%
lalli_idx 34483/s 2774% 65% 62% 54% 4%
-- -29%
j_index 48309/s 3926% 131% 127% 116% 45%
40% --
Rate bullock jackman j_b2 j_b lalli
lalli_idx j_index
bullock 2818/s -- -75% -83% -83% -83%
-95% -97%
jackman 11086/s 293% -- -31% -32% -33%
-79% -87%
j_b2 16129/s 472% 45% -- -1% -3%
-70% -81%
j_b 16234/s 476% 46% 1% -- -2%
-70% -81%
lalli 16556/s 488% 49% 3% 2% --
-69% -80%
lalli_idx 53763/s 1808% 385% 233% 231% 225%
-- -37%
j_index 84746/s 2908% 664% 425% 422% 412%
58% --
------------------------------
Date: Thu, 19 Jun 2008 12:47:06 -0700 (PDT)
From: Jason Carlton <jwcarlton@gmail.com>
Subject: Does sleep increase server load?
Message-Id: <1134f4a2-df2c-49a4-ab10-a193b646905c@w4g2000prd.googlegroups.com>
I'm pretty sure that this is a basic question, but I simply don't know
the answer. Does the sleep command increase the server load at all
while running?
The reason I ask, I have a contact form that spam robots typically try
to use to send junk. I have some very basic filters in place that
catch 99.9% of it, which is great, but the robots still waste my
server resources in trying to utilize it. So, I was thinking of
dropping them into a loop; something along the lines of:
if ($spam_criteria eq "true") {
while (1 > 0) {
sleep 200;
}
}
else {
# send email
}
I know that the while statement would use a little of the resources,
but if sleep doesn't then the sleep 200 would at least give the server
a break in between. And when the robots attack, it's usually at a rate
of 5 or 10 per second, so this is significantly better.
But, of course, it only works if sleep 200 doesn't increase the server
load!
TIA,
Jason
------------------------------
Date: Thu, 19 Jun 2008 15:03:47 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Does sleep increase server load?
Message-Id: <485abba3$0$48218$815e3792@news.qwest.net>
Jason Carlton wrote:
> I'm pretty sure that this is a basic question, but I simply don't know
> the answer. Does the sleep command increase the server load at all
> while running?
>
> The reason I ask, I have a contact form that spam robots typically try
> to use to send junk. I have some very basic filters in place that
> catch 99.9% of it, which is great, but the robots still waste my
> server resources in trying to utilize it. So, I was thinking of
> dropping them into a loop; something along the lines of:
>
> if ($spam_criteria eq "true") {
> while (1 > 0) {
> sleep 200;
> }
> }
>
> else {
> # send email
> }
>
> I know that the while statement would use a little of the resources,
> but if sleep doesn't then the sleep 200 would at least give the server
> a break in between. And when the robots attack, it's usually at a rate
> of 5 or 10 per second, so this is significantly better.
>
> But, of course, it only works if sleep 200 doesn't increase the server
> load!
It won't "work" because it'll never exit the while. Calling sleep()
will tie up the process, which would be bad if you got a few thousand
requests in a short amount of time. It'd probably be best to
stop processing the message as soon as you determine $spam_criteria
is 'true'.
You could also look at many very good filters that are available,
instead of rolling your own, or using some spam aversion techniques,
like Captcha, or embedding some javasacript in your form to set
a field.
------------------------------
Date: Thu, 19 Jun 2008 15:26:36 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Does sleep increase server load?
Message-Id: <86iqw5uq6b.fsf@lifelogs.com>
On Thu, 19 Jun 2008 12:47:06 -0700 (PDT) Jason Carlton <jwcarlton@gmail.com> wrote:
JC> I'm pretty sure that this is a basic question, but I simply don't know
JC> the answer. Does the sleep command increase the server load at all
JC> while running?
No, it just puts the calling process to sleep.
JC> The reason I ask, I have a contact form that spam robots typically try
JC> to use to send junk. I have some very basic filters in place that
JC> catch 99.9% of it, which is great, but the robots still waste my
JC> server resources in trying to utilize it.
sleep() would be the wrong way to handle that, because the connections
will still be coming while you're idle. Better to handle them as soon
as possible. Even better, provide just a mailing address and no contact
form if possible.
Ted
------------------------------
Date: Thu, 19 Jun 2008 13:48:14 -0700 (PDT)
From: Jason Carlton <jwcarlton@gmail.com>
Subject: Re: Does sleep increase server load?
Message-Id: <47969085-39c9-4bb6-a245-e85b747b4cd2@34g2000hsh.googlegroups.com>
On Jun 19, 4:26=A0pm, Ted Zlatanov <t...@lifelogs.com> wrote:
> On Thu, 19 Jun 2008 12:47:06 -0700 (PDT) Jason Carlton <jwcarl...@gmail.c=
om> wrote:
>
> JC> I'm pretty sure that this is a basic question, but I simply don't kno=
w
> JC> the answer. Does the sleep command increase the server load at all
> JC> while running?
>
> No, it just puts the calling process to sleep.
>
> JC> The reason I ask, I have a contact form that spam robots typically tr=
y
> JC> to use to send junk. I have some very basic filters in place that
> JC> catch 99.9% of it, which is great, but the robots still waste my
> JC> server resources in trying to utilize it.
>
> sleep() would be the wrong way to handle that, because the connections
> will still be coming while you're idle. =A0Better to handle them as soon
> as possible. =A0Even better, provide just a mailing address and no contac=
t
> form if possible.
>
> Ted
Ahh, good points, from both of you. I do prefer to create my own
processes, mainly for the fun of it, so I might set up a catcha-type
process, instead.
I dread that, though, because some of my site visitors are (please
forgive me) about as dumb as a box of hammers! LOL For instance, I
have a significant portion that don't bother to enter the part of
their email address after the @; they just ASSUME that I would know
who their provider is!
People have taught me a whole new meaning to "keep it at a 3rd grade
level" :-)
------------------------------
Date: 19 Jun 2008 21:26:03 GMT
From: xhoster@gmail.com
Subject: Re: Does sleep increase server load?
Message-Id: <20080619172605.762$2G@newsreader.com>
Jason Carlton <jwcarlton@gmail.com> wrote:
> I'm pretty sure that this is a basic question, but I simply don't know
> the answer. Does the sleep command increase the server load at all
> while running?
>
> The reason I ask, I have a contact form that spam robots typically try
> to use to send junk. I have some very basic filters in place that
> catch 99.9% of it, which is great, but the robots still waste my
> server resources in trying to utilize it. So, I was thinking of
> dropping them into a loop; something along the lines of:
>
> if ($spam_criteria eq "true") {
> while (1 > 0) {
> sleep 200;
> }
> }
>
> else {
> # send email
> }
How do you detect when the spammer process loses patience and drops there
end of the connection? In some settings, like CGI, something outside
your perl script (e.g. the Apache httpd) might detect this dropped
connection and then kill your script for you. But if that doesn't happen,
then your loop will never end. You will soon pile up hundreds or thousands
of sleeping processes. They will use a negligible amount of CPU time, but
they will fill up your OS's the "process table" and cause problems.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Fri, 20 Jun 2008 11:32:27 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: extract all hotmail email addresses in a file and store in separate file
Message-Id: <g3g4m1.bo.1@news.isolution.nl>
Martijn Lievaart schreef:
> On Thu, 19 Jun 2008 08:38:40 +0200, Martijn Lievaart wrote:
>> perl -nie 'if (/\@hotmail.com@$/) { s/"//g; print; }' text_file
>
> Or even:
>
> perl -nie 's/"//g; print if /\@hotmail.com@$/' text_file
Don't you mean this?
perl -ne 's/"//g; print if /\@hotmail\./' text_file
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Thu, 19 Jun 2008 18:11:56 -0400
From: pete <pfiland@mindspring.com>
Subject: Re: extract all hotmail email addresses in a file and store in separate file
Message-Id: <qPSdnRe7ctIxRMfVnZ2dnUVZ_ovinZ2d@earthlink.com>
santosh wrote:
> Well reading a file into a linked-list isn't exactly inappropriate, but
> it may be overkill for the small fragment that the OP posted. But it
> could be that the OP's actual file contains hundreds or thousands of
> email addresses. Constructing a linked-list will obviously take more
> storage than a plain linear array, but it makes some tasks like sorting
> lines, inserting lines, deleting lines, etc., much more easier. I
> suspect that this is the reason why pete uses them.
I like to convert lines to strings: the opposite of what puts does;
because strings are easy to work on in memory,
and strings are easy to write as lines to files, like puts does.
Linked lists are good to store pointers to strings.
--
pete
------------------------------
Date: Thu, 19 Jun 2008 17:56:27 -0400
From: CBFalconer <cbfalconer@yahoo.com>
Subject: Re: extract all hotmail email addresses in a file and store in separate file
Message-Id: <485AD60B.4C576209@yahoo.com>
vippstar@gmail.com wrote:
> Tomás Ó hÉilidhe <t...@lavabit.com> wrote:
>
... snip ...
>
>> Take the last 12 characters, make them all lowercase, and then
>> compare with "@hotmail.com".
>
> @ does not belong to C's basic character set, so, that's not
> possible.
No problem. getc etc. return integer equivalents of unsigned
char. There are lots of chars in any char set that do not have
lowercase versions, and the case conversion routines will simply
return the original char.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **
------------------------------
Date: Thu, 19 Jun 2008 19:55:13 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: extract all hotmail email addresses in a file and store in separate file
Message-Id: <pan.2008.06.19.17.55.13@rtij.nl.invlalid>
On Thu, 19 Jun 2008 08:38:40 +0200, Martijn Lievaart wrote:
> perl -nie 'if (/\@hotmail.com@$/) { s/"//g; print; }' text_file
Or even:
perl -nie 's/"//g; print if /\@hotmail.com@$/' text_file
M4
------------------------------
Date: Thu, 19 Jun 2008 09:16:00 -0500
From: "Mario D'Alessio" <dalessio@motorola.NOSPAM.com>
Subject: Re: FAQ 8.2 How come exec() doesn't return?
Message-Id: <g3dq81$fnt$1@newshost.mot.com>
"PerlFAQ Server" <brian@stonehenge.com> wrote in message
news:612qi5-hl4.ln1@blue.stonehenge.com...
> This is an excerpt from the latest version perlfaq8.pod, which
> comes with the standard Perl distribution. These postings aim to
> reduce the number of repeated questions as well as allow the community
> to review and update the answers. The latest version of the complete
> perlfaq is at http://faq.perl.org .
>
> --------------------------------------------------------------------
>
> 8.2: How come exec() doesn't return?
>
> Because that's what it does: it replaces your currently running program
> with a different one. If you want to keep going (as is probably the
> case
> if you're asking this question) use system() instead.
>
>
>
> --------------------------------------------------------------------
This FAQ answer should probably be expanded to mention
fork() as well, since the user of exec() may have wanted
to start another process but keep the original one, too.
Mario
------------------------------
Date: Fri, 20 Jun 2008 04:09:15 -0700 (PDT)
From: Bill H <bill@ts1000.us>
Subject: Re: FAQ 8.2 How come exec() doesn't return?
Message-Id: <d66e29c1-4894-4821-8a4a-073180aa7f0b@d1g2000hsg.googlegroups.com>
On Jun 19, 10:16=A0am, "Mario D'Alessio" <dales...@motorola.NOSPAM.com>
wrote:
> "PerlFAQ Server" <br...@stonehenge.com> wrote in message
>
> news:612qi5-hl4.ln1@blue.stonehenge.com...
>
>
>
>
>
> > This is an excerpt from the latest version perlfaq8.pod, which
> > comes with the standard Perl distribution. These postings aim to
> > reduce the number of repeated questions as well as allow the community
> > to review and update the answers. The latest version of the complete
> > perlfaq is athttp://faq.perl.org.
>
> > --------------------------------------------------------------------
>
> > 8.2: How come exec() doesn't return?
>
> > =A0 =A0Because that's what it does: it replaces your currently running =
program
> > =A0 =A0with a different one. If you want to keep going (as is probably =
the
> > case
> > =A0 =A0if you're asking this question) use system() instead.
>
> > --------------------------------------------------------------------
>
> This FAQ answer should probably be expanded to mention
> fork() as well, since the user of exec() may have wanted
> to start another process but keep the original one, too.
>
> Mario- Hide quoted text -
>
> - Show quoted text -
When you mentioned fork() I thought this might be the answer to a
issue I have had on the back burner, but reading the perldoc I see it
don't do it either.
Here is the issue, maybe you all will have a solution.
In a perl cgi, I would like to do some file maintenance (remove old
temporary files, session files etc) when a user accesses a program but
I don't want to make them wait for it. Which command would I use to
invoke a different perl program that is totally detached from the
running one (runs in the background) and could still be running when
the user is finished with the original program and not cause any delay
(other than using more resources on the server) in the original
program.
The only solution I can think of (and it probably is the best) is to
make the maintenance program a cron job since it has no interaction
with the user but I think it would be a cleaner solution to only have
the maintenance program executed when something needs to be
maintained.
Bill H
------------------------------
Date: Thu, 19 Jun 2008 13:18:20 -0700 (PDT)
From: Nene <rodbass63@gmail.com>
Subject: I need help running DBI
Message-Id: <f5a9ebaa-aeb6-4200-92a5-5b23a67309f8@e39g2000hsf.googlegroups.com>
I compied perl and DBI on BOX A; I did ./Configure prefix=/blah/blah.
I copied over the perl directories to BOX B (don't worry the prefix
install path mimicks perl on BOX B).
Now I can run perl, I tested with a hello world program, I added use
strict, use warnings. Works w/o issues.
Now when I add 'use DBI', I get an error because I have missing lib
files in BOX B (its not the libmysqlclient libraries are missing).
Below is the error:
install_driver(mysql) failed: Can't load '/c$/perlscripts/
localperl5.10/lib/site_perl/5.10.0/i686-linux-64int/auto/DBD/mysql/
mysql.so' for module DBD::mysql: libssl.so.4: cannot open shared
object file: No such file or directory at /c$/perlscripts/
localperl5.10/lib/5.10.0/i686-linux-64int/DynaLoader.pm line 203.
Its not mysql.so that is causing the problem, its libssl.so.4 that is
missing on BOX B. I can easily copy over that file from another box
(which I did) run it again, and I'll get another missing lib file;
about 5 or 6 of them.
So what is the best course of action to get this resolved. Can I
recompile DBI on BOX A and tell it to point all the neccessary lib
files to a directory in the Perl directory?
When I did a ldd on mysql.so, I got:
ldd /auto/DBD/mysql/mysql.so
linux-gate.so.1 => (0xffffe000)
libmysqlclient.so.15 => /usr/lib/mysql/libmysqlclient.so.15
(0xf7ddd000)
libz.so.1 => /lib32/libz.so.1 (0xf7dc8000)
libcrypt.so.1 => /lib32/libcrypt.so.1 (0xf7d9a000)
libnsl.so.1 => /lib32/libnsl.so.1 (0xf7d85000)
libm.so.6 => /lib32/tls/libm.so.6 (0xf7d62000)
libssl.so.4 => /lib/libssl.so.4 (0xf7d2e000)
libcrypto.so.4 => /lib/libcrypto.so.4 (0xf7c44000)
libc.so.6 => /lib32/tls/libc.so.6 (0xf7b2a000)
/lib/ld-linux.so.2 (0x56555000)
libgssapi_krb5.so.2 => not found
libkrb5.so.3 => not found
libcom_err.so.2 => /lib32/libcom_err.so.2 (0xf7b28000)
libk5crypto.so.3 => not found
libresolv.so.2 => /lib32/libresolv.so.2 (0xf7b13000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7b0f000)
libgssapi_krb5.so.2 => not found
libkrb5.so.3 => not found
libk5crypto.so.3 => not found
Does this mean I have to copy all these files over from BOX A to BOX B
to work. Is there an easier way, thanks in advance.
nene
------------------------------
Date: Thu, 19 Jun 2008 22:39:54 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: I need help running DBI
Message-Id: <aa0ri5-vvv.ln1@osiris.mauzo.dyndns.org>
Quoth Nene <rodbass63@gmail.com>:
> I compied perl and DBI on BOX A; I did ./Configure prefix=/blah/blah.
> I copied over the perl directories to BOX B (don't worry the prefix
> install path mimicks perl on BOX B).
>
> Now I can run perl, I tested with a hello world program, I added use
> strict, use warnings. Works w/o issues.
>
> Now when I add 'use DBI', I get an error because I have missing lib
> files in BOX B (its not the libmysqlclient libraries are missing).
> Below is the error:
>
> install_driver(mysql) failed: Can't load '/c$/perlscripts/
> localperl5.10/lib/site_perl/5.10.0/i686-linux-64int/auto/DBD/mysql/
> mysql.so' for module DBD::mysql: libssl.so.4: cannot open shared
> object file: No such file or directory at /c$/perlscripts/
> localperl5.10/lib/5.10.0/i686-linux-64int/DynaLoader.pm line 203.
>
> Its not mysql.so that is causing the problem, its libssl.so.4 that is
> missing on BOX B. I can easily copy over that file from another box
> (which I did) run it again, and I'll get another missing lib file;
> about 5 or 6 of them.
>
> So what is the best course of action to get this resolved. Can I
> recompile DBI on BOX A and tell it to point all the neccessary lib
> files to a directory in the Perl directory?
No, sorry.
> When I did a ldd on mysql.so, I got:
>
> ldd /auto/DBD/mysql/mysql.so
<snip»
>
> Does this mean I have to copy all these files over from BOX A to BOX B
> to work.
Yes. Don't attempt to copy any that are already present on box B, and
note that linux-gate.so doesn't actually exist (it's an artefact of the
Linux dynamic loader) so you can't copy that one either.
> Is there an easier way, thanks in advance.
Easier would be to install perl, DBI and DBD::mysql on box B through
your OS's package system.
Ben
--
We do not stop playing because we grow old;
we grow old because we stop playing.
ben@morrow.me.uk
------------------------------
Date: Fri, 20 Jun 2008 01:00:41 +0200 (CEST)
From: Jim Cochrane <allergic-to-spam@no-spam-allowed.org>
Subject: Re: Learning Perl
Message-Id: <slrng5lp7k.6n5.allergic-to-spam@no-spam-allowed.org>
On 2008-06-18, Gordon Corbin Etly <g> wrote:
> Uri Guttman wrote:
>>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:
>> > Uri Guttman wrote:
>> >>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:
>
>> > > see you don't get it. it isn't broken behavior but behavior that
>> > > shouldn't have been there to begin with. like my $x = 1 if 0 stuff
>> > > which does something that was bad but not deprecated until
>> > > recently.
>
>> > I do get it. Maybe tell nose thumbing would allow us to understand
>> > each other better.
>
>> huh?? and you don't get it. otherwise you wouldn't have been defending
>> the undefensible for so long. and i don't get that you even
>> acknowledge you were wrong about it.
>
> ...
>
> I wasn't really disputing the documentation, though; I just feel it can
> be useful to test weather an array or hash has been given a value since
> it's inception, or if it has been run through the undef() function.
> I can thing of a few scenarios where it maybe be useful to able to check
> for such a state separately from being just empty, much like one might
> test for undef vs. 0 or "".
What do you mean by "given a value"? Do you mean "has memory for the
array [or hash] been allocated?"?
If so, when you that knowledge be useful in a program?
--
------------------------------
Date: Fri, 20 Jun 2008 10:55:13 +0200 (CEST)
From: Jim Cochrane <allergic-to-spam@no-spam-allowed.org>
Subject: Re: Learning Perl
Message-Id: <slrng5ms2c.9pc.allergic-to-spam@no-spam-allowed.org>
On 2008-06-19, Jim Cochrane <allergic-to-spam@no-spam-allowed.org> wrote:
> On 2008-06-18, Gordon Corbin Etly <g> wrote:
>> Uri Guttman wrote:
>>>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:
>>> > Uri Guttman wrote:
>>> >>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:
>>
>>> > > see you don't get it. it isn't broken behavior but behavior that
>>> > > shouldn't have been there to begin with. like my $x = 1 if 0 stuff
>>> > > which does something that was bad but not deprecated until
>>> > > recently.
>>
>>> > I do get it. Maybe tell nose thumbing would allow us to understand
>>> > each other better.
>>
>>> huh?? and you don't get it. otherwise you wouldn't have been defending
>>> the undefensible for so long. and i don't get that you even
>>> acknowledge you were wrong about it.
>>
>> ...
>>
>> I wasn't really disputing the documentation, though; I just feel it can
>> be useful to test weather an array or hash has been given a value since
>> it's inception, or if it has been run through the undef() function.
>> I can thing of a few scenarios where it maybe be useful to able to check
>> for such a state separately from being just empty, much like one might
>> test for undef vs. 0 or "".
>
> What do you mean by "given a value"? Do you mean "has memory for the
> array [or hash] been allocated?"?
>
> If so, when you that knowledge be useful in a program?
Ugh - correction:
If so, when do you think that knowledge would be useful in a program?
--
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 V11 Issue 1660
***************************************