[23722] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 5928 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Dec 11 21:05:50 2003

Date: Thu, 11 Dec 2003 18:05:10 -0800 (PST)
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, 11 Dec 2003     Volume: 10 Number: 5928

Today's topics:
        @ISA specific to instance rather than class? <mb@uq.net.au.invalid>
        basic question on regexp (Richard Snow)
        Calling Another Script <nospam.hciss@yahoo.com>
    Re: Calling Another Script <jgibson@mail.arc.nasa.gov>
    Re: Calling Another Script <jurgenex@hotmail.com>
    Re: Can't resample with Lame <invalid-email@rochester.rr.com>
        Catching Errors <thesnake_123@-NO-S_P_A_M-hotmail.com>
    Re: Catching Errors <noreply@gunnar.cc>
        Coders, find work with Colance!                         (Thomas Ramirez)
    Re: File handeling <jundy@jundy.com>
        Freelance work for Java coders.                         (George Wright)
    Re: I need help please! <joinup@i32768.cotse.net>
    Re: improve code - combine for & join <noreply@gunnar.cc>
        List your projects with Colance!                        (Sharon Bailey)
        Looking for script to monitor http and https sites (perlnovice)
    Re: Looking for script to monitor http and https sites (Tad McClellan)
        LWP install MacOS X <henryn@zzzspacebbs.com>
    Re: Need programmers? At Colance they compete for your  <noreply@gunnar.cc>
    Re: Need programmers? At Colance they compete for your  <michael.p.broida@fake.domain>
        Need programmers? At Colance they compete for your busi (Rebecca Lopez)
    Re: PAR / Post install problem / bad signature ... <iain@smokehythe.net>
        Perl, PHP, ASP, XML, Java, C++ Coders NEEDED            (Shawn Patterson)
        Perl/CGI, PHP, ASP, XML, Java, Javascript, C/C++, Flash (Timothy Martin)
    Re: Perl2EXE vs. PAR vs. perlcc <astewart1@cox.net>
    Re: perlcc <astewart1@cox.net>
        Reconnecting to Database in a script (dn_perl@hotmail.com)
    Re: Reconnecting to Database in a script <spamfilter@dot-app.org>
    Re: search Forum, BBS script <technohippie@myway.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 12 Dec 2003 10:57:15 +1000
From: Matthew Braid <mb@uq.net.au.invalid>
Subject: @ISA specific to instance rather than class?
Message-Id: <brb3pb$g32$1@bunyip.cc.uq.edu.au>

Hi all,

I'm streamlining one of my own packages by splitting off optional 
functionality into sub-packages and only use base'ing them when 
required, eg:

sub use_something {
   my $self = shift;
   eval {use base qw/My::Package::Something/};
   die $@ if $@;
   return 1;
}

This works well, but it means that once one instance of the class uses 
the 'something', then all of them have it loaded on creation.

I'm not worried about this, but I was wondering if there is a way to 
make an instance of an object use an extra base package without the 
whole class doing so.

(Oh, and yes I know about AutoSplitting, but its kind of messy and much 
harder to write installers for, and results in pretty much the same 
thing anyway)

Any ideas? (As I said - not bothered if there is no way :) )

MB



------------------------------

Date: 11 Dec 2003 11:35:49 -0800
From: Richard@RichardSnow.org (Richard Snow)
Subject: basic question on regexp
Message-Id: <5b24ee87.0312111135.7210b985@posting.google.com>

Glenn & Gunnar,

Thanks.  You taught me two things about regular expressions.

Sheepishly, Richard Snow


------------------------------

Date: Thu, 11 Dec 2003 17:29:27 -0600
From: "Matt" <nospam.hciss@yahoo.com>
Subject: Calling Another Script
Message-Id: <vthvf9f2ugci8e@corp.supernews.com>

I need to have perl script call another script on a Linux box and parse its
output.  When I call this other script it returns between 1 and 100 lines of
data depending on time of day.  So I need to get this data that script
returns into my script.  At the moment all I really need is a count of how
many lines of data actually.  So how would I do that?

Matt






------------------------------

Date: Thu, 11 Dec 2003 16:17:10 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: Calling Another Script
Message-Id: <111220031617101383%jgibson@mail.arc.nasa.gov>

In article <vthvf9f2ugci8e@corp.supernews.com>, Matt
<nospam.hciss@yahoo.com> wrote:

> I need to have perl script call another script on a Linux box and parse its
> output.  When I call this other script it returns between 1 and 100 lines of
> data depending on time of day.  So I need to get this data that script
> returns into my script.  At the moment all I really need is a count of how
> many lines of data actually.  So how would I do that?
> 
> Matt

Use backticks or qx// to fork another process and capture its standard
output:

my @output = `script2`;
print scalar(@output), " lines of output\n";


------------------------------

Date: Fri, 12 Dec 2003 01:35:20 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Calling Another Script
Message-Id: <sX8Cb.1969$914.627@nwrddc01.gnilink.net>

Matt wrote:
> I need to have perl script call another script on a Linux box

perldoc -f system

> and
> parse its output.

Pay particular attention to the third sentence in the third paragraph.
Or start with "perldoc -q system" right away.

> When I call this other script it returns between 1
> and 100 lines of data depending on time of day.  So I need to get
> this data that script returns into my script.  At the moment all I
> really need is a count of how many lines of data actually.  So how
> would I do that?

Pipe the output of the other script through "wc -l" before reading the it in
your program.

jue




------------------------------

Date: Thu, 11 Dec 2003 23:08:36 GMT
From: Bob Walton <invalid-email@rochester.rr.com>
Subject: Re: Can't resample with Lame
Message-Id: <3FD8F8C1.2030809@rochester.rr.com>

William wrote:

> I am running Apache 1.3.29, ActiveState Perl 5.6, Windows XP and
> mod_perl.  Here is part of my httpd.conf file for configuring the
> handler for the /Songs location.
> 
>   <Location /Songs>
>     SetHandler perl-script
>     PerlSetEnv PATH c:/lame
>     PerlHandler Apache::MP3::Resample
>     PerlSetVar CacheDir /temp
>     PerlSetVar MP3Encoder 'lame --mp3input %b - <%f'
>     PerlSetVar ResamplePresets 'Low     => -b16'
>     PerlSetVar AllowDownload no
>   </Location>
> 
> I set up a simple html file with the following:
> 
> <a href="/Songs/Song_to_play.m3u?play=1>Song</a> where
> Song_to_play.mp3 is located in the /Songs directory.
> 
> When I click on the link, the Apache::MP3 module streams the file in
> it's original bitrate, but I want it to stream in the Low bitrate
> (defined above).  I'm not sure why this isn't working, but any help
> will be greatly appreciated.
> 

Is there supposed to be a Perl question buried in there somewhere?  If 
not, you would be much better off posting elsewhere, as we discuss Perl 
here.

-- 
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl



------------------------------

Date: Fri, 12 Dec 2003 00:54:20 GMT
From: "-Brad-" <thesnake_123@-NO-S_P_A_M-hotmail.com>
Subject: Catching Errors
Message-Id: <0l8Cb.48951$aT.16943@news-server.bigpond.net.au>

Insted of display Server error Id like to display something meaningful that
will assist me in debuging the problem without having to look at the server
error log.
If i use Carp qw(fatalsToBrowser)
It helps a little, but is there a way I can display similar to what would be
seen in the error_log,
eg
Missing right curly bracket at line 20.

Thanks




------------------------------

Date: Fri, 12 Dec 2003 02:02:26 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Catching Errors
Message-Id: <brb4i9$1funq$1@ID-184292.news.uni-berlin.de>

-Brad- wrote:
> Insted of display Server error Id like to display something
> meaningful that will assist me in debuging the problem without
> having to look at the server error log.
> If i use Carp qw(fatalsToBrowser)

Suppose you mean

     use CGI::Carp qw(fatalsToBrowser);

> It helps a little, but is there a way I can display similar to what
> would be seen in the error_log,
> eg Missing right curly bracket at line 20.

That is a fatal error, which should be captured by fatalsToBrowser().
Personally I have experienced significant differences in how different
versions of CGI::Carp behaves.

If it's more convenient to you, you may want to keep a 'private' error
log by using the carpout() function. See the CGI::Carp documentation
about how it works.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



------------------------------

Date: Fri, 12 Dec 2003 00:57:07 GMT
From: TRamirez@excite.com (Thomas Ramirez)
Subject: Coders, find work with Colance!                                                         1n
Message-Id: <Dn8Cb.12743$NN.2173477@news1.news.adelphia.net>


Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project.
Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs.

http://www.colance.com













udD8elqQQXNZuWdtOcUc6NyUmxMqVcpA




------------------------------

Date: Thu, 11 Dec 2003 19:11:08 GMT
From: Erik Tank <jundy@jundy.com>
Subject: Re: File handeling
Message-Id: <3b66aa8b580e14d0425de33ef41b2467@news.teranews.com>

IMHO - Perl is the best language that attempts to garauntee that you
don't have to reinvent the wheel.  Check out this article from Randal
Schwartz' Web Techniques articles;
http://www.stonehenge.com/merlyn/WebTechniques/col01.html


On Thu, 11 Dec 2003 06:14:19 +0000, Truthless <nospam@spamcop.org>
wrote:

>Carsten Aulbert wrote:
>> Hi nameless one ;-),
>> 
>> I think a good starting point would be to look at 'perldoc -f -s' which 
>> should list you possible operators to get info about a file, e.g. -s 
>> $filename will return you the size of a file in bytes.
>> 
>> Secondly, the standard module File::Find ('perldoc File::Find') will 
>> help you emulating some parts of the find program.
>> 
>> HTH
>> 
>> CA
>
>Hello,
>
>Thanks for the info all who replied.
>
>Guess I need to learn more about the include modules. No sense 
>reinventing the wheel.



------------------------------

Date: Fri, 12 Dec 2003 00:57:17 GMT
From: GWright@google.com (George Wright)
Subject: Freelance work for Java coders.                                                         Rx7oY
Message-Id: <Nn8Cb.12744$NN.2173560@news1.news.adelphia.net>


Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project.
Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs.

http://www.colance.com













bgQ9CZZgA8lvb0bDIkIN7vqKsc




------------------------------

Date: Thu, 11 Dec 2003 18:22:37 -0600
From: "Raccoon Man/IŠO" <joinup@i32768.cotse.net>
Subject: Re: I need help please!
Message-Id: <3fd90a4e_2@news-east.newsfeeds.com>
Keywords: world

I need help too!
I want it to be 1998 again; I wanna go back!
I like programming for sex and getting poontang and doing drugs on the job
which I can't help because I take my work home -- except I like to do it on
the desk too sometimes.
Things, however, have slowed down my man.

How can it be done?
Illicit and marginally dangerous sex?
Narcotics?
Time travel?

Help meeeeeee!

1 9 9 8 -- Nineteen Ninety Eight -- Yeah!

I also want it to be 1869:  Stop the EU -- Bring back Austria-Hungary!

IŠO International Newsgroup Retromoderator
Ivo Šandor Organisation Ges. m.b.H. -- all yuor base is belong to us, and
hydrochlorides and sulphates too!


"Lowell S"
<info@helplowell.com|lowellschafer@excite.com|lowellschafer@hotmail.com|natu
repath2@yahoo.com|pacificsw2@yahoo.com> wrote in message
news:452238312903@news.corenews.com...
Help! I need help. I've got law enforcement about to lock me up again for
something I'm innocent of.
It's somewhat of a long story but my not being able to pay child support
stems from having worked
too hard in most of the first 12 years I was in the work force. I found that
hard work and perseverance
coupled with integrity can land one straight in jail. By the time I was 29
years old my back was totally
ruined rendering me incapable of working more than a few short hours a week
unless I was to endure
lots of excruciating pain that would last all day and all night for days
before it would finally subside again.
If you go to my website at www.helplowell.com I'll tell you the story in
more detail. I've had to be a fugitive for way too much of the last 15 years
due to an
ex wife and prosecution who just won't get it through their head that I am
disabled and not capable of 500 a month.

Now that the kids are all grown they're still after me for arears. I can be
emailed at
naturepath2@yahoo.com, lowellschafer@hotmail.com pacificsw2@yahoo.com or you
can call me at 801 706-1211.
I appreciate any help I can get more than you'll ever know.



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


------------------------------

Date: Thu, 11 Dec 2003 20:36:23 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: improve code - combine for & join
Message-Id: <brahd5$17u70$1@ID-184292.news.uni-berlin.de>

Mike Solomon wrote:
> I have written the following code that does what I require but I am
> sure it could be done better
> 
> How can I improve this

It's obviously a subroutine. To be able to comment on it, I'd like to
know the context in which that subroutine is called. What are you
doing with those comma delimited strings that are returned?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



------------------------------

Date: Fri, 12 Dec 2003 00:57:46 GMT
From: SBailey@hotmail.com (Sharon Bailey)
Subject: List your projects with Colance!                                                         Iptv
Message-Id: <eo8Cb.12747$NN.2173602@news1.news.adelphia.net>


Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project.
Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs.

http://www.colance.com













JExP7SzkoVTNi




------------------------------

Date: 11 Dec 2003 11:31:08 -0800
From: tdang1@slb.com (perlnovice)
Subject: Looking for script to monitor http and https sites
Message-Id: <8c66c403.0312111131.25cdbb5@posting.google.com>

Hello,

I am looking for a perl script that can help me monitor about 15 http and https
websites. 

The script will:

    o Download the webpage then verify if the page contains some text.
      1. If it does the script goes back to sleep.
      2. If not, it will send out an email.
    o If the website is down. The script will time out in 10 seconds and send 
      out an email.

Should you have a script doing the similar job please send me an copy.

Thank you very much in advance,

perlnovice


------------------------------

Date: Thu, 11 Dec 2003 14:29:23 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Looking for script to monitor http and https sites
Message-Id: <slrnbthkt3.19u.tadmc@magna.augustmail.com>

perlnovice <tdang1@slb.com> wrote:

> I am looking for a perl script


Please use a search engine or post somewhere else if you are
searching for a Perl program.

Post here if you are *writing* a Perl program.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Thu, 11 Dec 2003 22:54:55 GMT
From: Henry <henryn@zzzspacebbs.com>
Subject: LWP install MacOS X
Message-Id: <BBFE35BB.19075%henryn@zzzspacebbs.com>

Folks:

I need LWP.  It doesn't come with Jaguar.

OK, it's time to go CPAN.  Download LWP. No problem.  But it won't install
unless URI, HTML::Parser, MIME::Base64, Net::FTP  (libnet), Digest::MD5  and
maybe some other stuff are already installed.

I get an error message that explains:

  "... MakeMaker could not find "/System/Library/Perl/darwin/CORE/perl.h"

Googling on this filename ... Some helpful person has posted the answer:  I
need the MacOS X Developer Tools, I'm likely to end up fighting a
case-sensitivity issue, and _he_ ended up doing a complete perl 5.8.0
install in a new place.

This LWP install is fast showing signs of being an infinite process; I'm
expecting, by tomorrow, to be told I need to cast new silicon for the
PowerPC processor!

Can someone confirm generally that all this needs to be done to get LWP
functionality?   That this process is actually do-able within a reasonable
amount of time, without additional tangled sub-dependencies?  Maybe suggest
a simplified procedure?

Yes, I've checked the perl and CPAN FAQs.  The page "What To Do Once You've
Downloaded A Module From The CPAN" is really nice.

Thanks,

Henry

henryn@zzzspacebbs.com  remove 'zzz'



------------------------------

Date: Fri, 12 Dec 2003 02:12:25 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Need programmers? At Colance they compete for your    business. luw8f
Message-Id: <brb552$lu3s$1@ID-184292.news.uni-berlin.de>

MPBroida wrote:
> Go to Colance.com, click on "Report Violations" (at the bottom) and
> send a nice message to the company.  Remember it might NOT be a
> real Colance person posting this crap, so keep your message 
> generally polite.  Just inform them that SOMEONE is tarnishing 
> their image by spamming the newsgroups.

Suppose you did just that. How on earth would if make a difference if
a lot of other people did as well?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



------------------------------

Date: Fri, 12 Dec 2003 01:04:53 GMT
From: MPBroida <michael.p.broida@fake.domain>
Subject: Re: Need programmers? At Colance they compete for your  business.                                                         luw8f
Message-Id: <3FD91435.145C49CA@fake.domain>

Rebecca Lopez wrote:
> 
> Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project.
> Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs.


	Well, whatever moron has been posting these isn't helping Colance any.

	Go to Colance.com, click on "Report Violations" (at the bottom)
	and send a nice message to the company.  Remember it might NOT
	be a real Colance person posting this crap, so keep your message
	generally polite.  Just inform them that SOMEONE is tarnishing
	their image by spamming the newsgroups.

		Mike


------------------------------

Date: Thu, 11 Dec 2003 22:56:37 -0000
From: RLopez@google.com (Rebecca Lopez)
Subject: Need programmers? At Colance they compete for your business.                                                         luw8f
Message-Id: <vthth54v3lrd01@corp.supernews.com>



Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project.
Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs.













F8AVoaniz




------------------------------

Date: Thu, 11 Dec 2003 23:31:35 +0000
From: Iain <iain@smokehythe.net>
Subject: Re: PAR / Post install problem / bad signature ...
Message-Id: <%Y6Cb.20261$lm1.177595@wards.force9.net>

Simon Andrews wrote:
> Iain wrote:
> 
>> Any PAR users out there?
>>
>> I've just built and tested PAR and most things are fine but for one 
>> niggling little issue that isn't addressed by PAR::FAQ.
>>
>> My resulting standalone binary runs okay but spews forth warnings like 
>> this one:
>>
>> format error: bad signature: 0x6174545f at offset 78727 in file 
>> IO::File=GLOB(0x8455f04)
>>  at /path/to/Module.pm line 7
> 
> 
> This is a bug which was introduced with the latest update to 
> Archive::Zip (v 1.09).  The zip file has a checksum cacluated, but PAR 
> adds some loader code to the front of it causing the checksum to be 
> invalid when the archive is extracted.
> 
> A fix should hopefully be present in Archive::Zip 1.10 and PAR 0.77, but 
> for now you can lose the warning by downgrading Archive::Zip to an older 
> verison.
> 

Wound it back to Archive::Zip 1.06 and it works fine.

PAR... it's a beautiful, beautiful thing :-)

Thanks,
Iain.
-- 
Clear the smoke from my address before replying directly to me.



------------------------------

Date: Fri, 12 Dec 2003 00:58:25 GMT
From: SPatterson@hotmail.com (Shawn Patterson)
Subject: Perl, PHP, ASP, XML, Java, C++ Coders NEEDED                                                         Q7PK
Message-Id: <Ro8Cb.12751$NN.2173615@news1.news.adelphia.net>


Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project.
Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs.

http://www.colance.com













xaEhgoPd




------------------------------

Date: Fri, 12 Dec 2003 00:59:17 GMT
From: TMartin@excite.com (Timothy Martin)
Subject: Perl/CGI, PHP, ASP, XML, Java, Javascript, C/C++, Flash, Python, and Cold Fusion                                                         AmHS
Message-Id: <Fp8Cb.12757$NN.2173758@news1.news.adelphia.net>


Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project.
Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs.

http://www.colance.com













kwAjFnp7cQflXCl




------------------------------

Date: Thu, 11 Dec 2003 17:30:30 -0800
From: Alan Stewart <astewart1@cox.net>
Subject: Re: Perl2EXE vs. PAR vs. perlcc
Message-Id: <ba6itvknlr2t7he8hdnkmk09ridt1gsrdo@4ax.com>

On Mon, 08 Dec 2003 15:03:25 +0000, Simon Andrews
<simon.andrews@bbsrc.ac.uk> wrote:

>
>ppm install PAR
>
>[wait whilst PAR installs]
>

I have always downloaded PAR from par.perl.org and compiled myself,
but I wonder what version you see with ppm?

I run ActiveState 5.6 build 635 and ppm3 tells me their repository
only has version 0.63. There have been some important bug fixes since
then.



------------------------------

Date: Thu, 11 Dec 2003 17:05:21 -0800
From: Alan Stewart <astewart1@cox.net>
Subject: Re: perlcc
Message-Id: <oq4itvsbmt2vt8pjlto1i66m6oeo8m5cpv@4ax.com>

On Thu, 11 Dec 2003 16:37:47 +0100, "ngoc" <linh@chello.no> wrote:

>Hi
>perl -c program_name.pl give output syntax is ok.
>
>I change
># use perl
>   eval 'exec perl -S $0 ${1+"$@"}'
>   if 0;
>to #path of which perl
>and pp -o program_name program_name.pl . It gives no error message.
>
>But when I run it ./program_name. It shows "format error: bad signature:
>...." before it shows the GUI.
>

If you have Archive::Zip version 1.09 (latest version), there is a
known bug with PAR version 0.76 that causes that error message. The
author has a possible fix testing now and should produce PAR 0.77 real
soon. PAR is worth waiting for...



------------------------------

Date: 11 Dec 2003 11:53:25 -0800
From: dn_perl@hotmail.com (dn_perl@hotmail.com)
Subject: Reconnecting to Database in a script
Message-Id: <97314b5b.0312111153.3e1d75a2@posting.google.com>

I run a perl script which uses an infinite loop.
I would like to incorporate checks which allow me to exit
the infinite loop if the database is brought down.

The current script is :

----------------
$dbh = DBI->connect or die ;
while(1)  {
    do certain things ;
    if( str eq 'this' )  {  # check one
        last;
    }
    # I want to add check # two here
    sleep 100 ;
}
$dbh->disconnect ;
----------------

What should check # two do?
Would the following statement work?
if( not $dbh )   { last ; }
    I don't know how $dbh is affected when the databse is brought down.
And I have no way of knowing it right now.


===========================


------------------------------

Date: Thu, 11 Dec 2003 21:00:10 GMT
From: Sherm Pendley <spamfilter@dot-app.org>
Subject: Re: Reconnecting to Database in a script
Message-Id: <uV4Cb.12638$NN.2122298@news1.news.adelphia.net>

dn_perl@hotmail.com wrote:

> Would the following statement work?
> if( not $dbh )   { last ; }
>     I don't know how $dbh is affected when the databse is brought down.

It probably isn't immediately affected at all - a client generally 
doesn't maintain a persistent connection to the DB, so won't know the 
server is down until it tries to connect to it and run a query.

Fortunately, DBI provides a ping() method for checking the server's status:

if ( not $dbh->ping() ) { last; }

sherm--


------------------------------

Date: Thu, 11 Dec 2003 12:23:48 -0800
From: TechnoHippie <technohippie@myway.com>
Subject: Re: search Forum, BBS script
Message-Id: <_-2dnVQN6dL0T0WiRVn-gw@comcast.com>

Liberal wrote:

> link to it?
> 
> 
>>Have you looked at Discus?  Very customizable and easy to install,
>>either manually or with thier autoinstall option.

Google says its at http://www.discusware.com/discus/index.php
Google is right.
Google is your friend.

Judy



------------------------------

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 5928
***************************************


home help back first fref pref prev next nref lref last post