[24299] in Perl-Users-Digest
Perl-Users Digest, Issue: 6490 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 30 00:06:10 2004
Date: Thu, 29 Apr 2004 21:05:05 -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 Thu, 29 Apr 2004 Volume: 10 Number: 6490
Today's topics:
Re: Count how many times find and replaced happened <alien_resident@sbcglobal.net>
Re: Count how many times find and replaced happened <kkeller-usenet@wombat.san-francisco.ca.us>
Re: cywin versus activestate on xp <dwall@fastmail.fm>
Re: cywin versus activestate on xp <flavell@ph.gla.ac.uk>
Re: cywin versus activestate on xp <david@tvis.co.uk>
Re: generating time series graphs with perl <1usa@llenroc.ude>
Re: generating time series graphs with perl <a5ufv8u02@sneakemail.com>
Re: generating time series graphs with perl <ebohlman@earthlink.net>
Re: generating time series graphs with perl <mgjv@tradingpost.com.au>
Re: generating time series graphs with perl <a5ufv8u02@sneakemail.com>
Re: generating time series graphs with perl <1usa@llenroc.ude>
Re: generating time series graphs with perl <a5ufv8u02@sneakemail.com>
Re: Help! maintaining/upgrading Perl on Windows (Loup Blanc)
myfile.cgi?image.gif saved as myfile.cgi in mozilla? <jcharth@hotmail.com>
Re: myfile.cgi?image.gif saved as myfile.cgi in mozilla <tadmc@augustmail.com>
Re: Newbie ... Net::SMTP module... where is it? <spamtrap@dot-app.org>
Re: Newbie ... Net::SMTP module... where is it? (Walter Roberson)
Re: Newbie ... Net::SMTP module... where is it? <spamtrap@dot-app.org>
Re: question about variable assignment - easy <spamtrap@dot-app.org>
Re: question about variable assignment - easy <dannywork5@hotmail.com>
Re: Script to kill defunct and zombie processes <matternc@comcast.net>
Re: Script to kill defunct and zombie processes (Bryan Castillo)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 29 Apr 2004 22:36:56 GMT
From: Alien Resident <alien_resident@sbcglobal.net>
Subject: Re: Count how many times find and replaced happened
Message-Id: <csfkc.57854$My3.48002@newssvr25.news.prodigy.com>
Tad McClellan wrote:
> Robin <webmaster@infusedlight> wrote:
>
>
>>From: "Robin" <webmaster @ infusedlight . net>
>
>
>
> Please choose one posting address and stick to it.
>
>
oh, yea... a couple got by me. Let's make this simple... contains: infusedlight or Robin
or potential for teeth grinding... OK let's hope that does it.
-AR
------------------------------
Date: Thu, 29 Apr 2004 15:52:04 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: Count how many times find and replaced happened
Message-Id: <ku0s6c.mq.ln@goaway.wombat.san-francisco.ca.us>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
On 2004-04-29, Robin <webmaster@infusedlight> wrote:
>
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrnc92qpb.3qo.tadmc@magna.augustmail.com...
>>
>> Please choose one posting address and stick to it.
> yeah I did...sorry.
You did? This is the third address you've used in the span of a few
weeks. Webmaster, indeed--I hope your webmaster skillz are markedly
better than your skillz "creating dynamic websites with CGI".
- --keith
- --
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQFAkYcThVcNCxZ5ID8RAoSsAJ9q/DYvsSl2k3mo33pyIUsU4uzSgQCfQQME
O2p6VLy5IL5gJB6me2iXH9w=
=XJEX
-----END PGP SIGNATURE-----
------------------------------
Date: Thu, 29 Apr 2004 22:10:27 -0000
From: "David K. Wall" <dwall@fastmail.fm>
Subject: Re: cywin versus activestate on xp
Message-Id: <Xns94DAB8E0FCB25dkwwashere@216.168.3.30>
usenet_spam_cygwin <beau@oblios-cap.com> wrote:
> Howdy. A google search "activestate versus cygwin" didn't do me
> much good, so I'm asking the fine folks at comp.lang.perl.misc:
> any clear reason to use one over the other? My objective, really,
> is as seamless as possible an experience as I work my way through
> the llama book for the first time. Many thanks! (My feelings
> won't be hurt by backchannel responses if you feel it's not
> sufficiently on topic.)
Hmm, I don't recall the exercises in _Learning Perl_ having much if
any *nix-specific flavor to them, so it shouldn't really make much
difference. I learned what I know of Perl by using it mostly on win32
systems -- but I'm by no means a Perl wizard.
The unix-specific parts of Perl are mostly pretty easy to spot,
anyway. If you already have Activestate Perl installed, see the
Windows Quirks section of the ActivePerl FAQ, and check out 'perldoc
perlwin32'. (One thing that makes perldoc MUCH better under win32 is
to get a copy of the 'less' pager program and set the environment
variable PERLDOC_PAGER to point to less.)
Contrariwise, if you're used to *nix systems or cygwin, I can't think
of any reason not to use Perl under cygwin. I keep cygwin around so
that, among other reasons, I can run Perl one-liners without dealing
with silly quoting issues the windows command-line shell imposes.
Elvish advice, both no and yes... but if you're used to windows, I'd
say stick with Activestate Perl. You'll have the voluminous Perl docs
available in HTML form for browsing and printing (do yourself and us
a favor and read the FAQ after you finish LP, or at least skim it),
PPM makes it painless to install most non-core modules, and there are
some win32-specific modules bundled with Activestate Perl that
occasionally come in handy.
--
David Wall
(no, I am not related to Larry Wall -- although I'd be happy to claim
him. Not so sure he'd be happy to claim me. :-)
------------------------------
Date: Thu, 29 Apr 2004 23:23:22 +0100
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: cywin versus activestate on xp
Message-Id: <Pine.LNX.4.53.0404292314530.28129@ppepc56.ph.gla.ac.uk>
On Thu, 29 Apr 2004, David K. Wall wrote:
> The unix-specific parts of Perl are mostly pretty easy to spot,
> anyway.
There used to be a degree of unix bigotry in some parts of the
documentation, but that has been wisely eased-out in recent versions.
Which well behoves a language that aims to be portable.
Nevertheless, there are still some useful features modelled on unix
paradigms which don't necessarily translate into Windows (generic)
terms, as you'd find out only too keenly if you tried to do the
related tasks in Win/9x. But Win/NT and its successors are quite
different animals, despite the superficial similarity.
> If you already have Activestate Perl installed, see the
> Windows Quirks section of the ActivePerl FAQ, and check out 'perldoc
> perlwin32'.
Good advice, indeed
> (One thing that makes perldoc MUCH better under win32 is
> to get a copy of the 'less' pager program and set the environment
> variable PERLDOC_PAGER to point to less.)
I must admit I find ActiveState's HTML-ified documentation to be more
approachable. Although there's just an occasional glitch where the
HTML conversion didn't quite click...
> Contrariwise, if you're used to *nix systems or cygwin, I can't think
> of any reason not to use Perl under cygwin. I keep cygwin around so
> that, among other reasons, I can run Perl one-liners without dealing
> with silly quoting issues the windows command-line shell imposes.
No dispute there.
> Elvish advice, both no and yes... but if you're used to windows, I'd
> say stick with Activestate Perl.
AFAICS both strands of your advice are good. (FWIW I've got both
available on Win/2K, although I do most of my serious work under unix
- or rather, nowadays it's linux).
best regards
------------------------------
Date: Fri, 30 Apr 2004 03:41:07 +0100
From: zzapper <david@tvis.co.uk>
Subject: Re: cywin versus activestate on xp
Message-Id: <mse39053frubnesp8l2631sv9uefq51mqr@4ax.com>
On Thu, 29 Apr 2004 20:03:27 GMT, wrote:
>Howdy. A google search "activestate versus cygwin" didn't do me much
>good, so I'm asking the fine folks at comp.lang.perl.misc: any clear
>reason to use one over the other? My objective, really, is as seamless as
>possible an experience as I work my way through the llama book for the
>first time. Many thanks! (My feelings won't be hurt by backchannel
>responses if you feel it's not sufficiently on topic.)
I use cygwin, but still use ActiveState Perl rather than the Cygwin
native Perl I'd rather not, but I find that the PPM Perl Package
Manager on AS is much more reliable the native cpan, which seems to
spend it's time saying you need other packages b4 giving up!
In particular I have trouble installing the mysql DBI & DBDs
zzapper (vim, cygwin, wiki & zsh)
--
vim -c ":%s.^.CyrnfrTfcbafbeROenzSZbbyranne.|:%s/[R-T]/ /Ig|:normal ggVGg?"
http://www.vim.org/tips/tip.php?tip_id=305 Best of Vim Tips
------------------------------
Date: 29 Apr 2004 22:17:46 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude>
Subject: Re: generating time series graphs with perl
Message-Id: <Xns94DABA1F1DCB0asu1cornelledu@132.236.56.8>
Po Boy <a5ufv8u02@sneakemail.com> wrote in
news:pan.2004.04.29.21.46.50.587897@sneakemail.com:
> I'm trying to find a perl module that will help me make a certain kind
> of graph. I believe it's called a time-series graph, but I'm not sure.
...
> I have tried using gnuplot and the GD package for these graphs, but
> have been unable to get either one to generate reasonable looking
> graphs.
You must not have read the documentation.
> Has anyone had success in graphing this kind of data? Can you
> recommend a module or some documentation or pointers that may help me
> out?
Well, you seem to have dismissed the one I would recommend. Use
GD::Graph:
http://search.cpan.org/~mverb/GDGraph-1.43/
> Looking forward to any help you can give me!
The following example can get you started. Please read the docs.
#! perl
use strict;
use warnings;
use GD::Graph::linespoints;
my @data = (
[ '1998', '1999', '2000', '2001', '2002', '2003', '2004', ],
[ 3, 5, 6, 3, 1, 2, 5, ],
[ 5, 1, 2, 2, 3, 2, 7, ],
);
my $graph = GD::Graph::linespoints->new(800, 600);
$graph->set(
x_label => 'Years',
y_label => 'Two Variables',
title => 'Time Series of v1 and v2',
) or die $graph->error;
my $gd = $graph->plot(\@data) or die $graph->error;
open my $png, '>', 'tsplot.png' or die $!;
binmode $png;
print $png $gd->png;
__END__
--
A. Sinan Unur
1usa@llenroc.ude (reverse each component for email address)
------------------------------
Date: Thu, 29 Apr 2004 17:52:21 -0500
From: Po Boy <a5ufv8u02@sneakemail.com>
Subject: Re: generating time series graphs with perl
Message-Id: <pan.2004.04.29.22.52.21.610489@sneakemail.com>
On Thu, 29 Apr 2004 22:17:46 +0000, A. Sinan Unur wrote:
> The following example can get you started. Please read the docs.
>
That example does help me; it's similar to one I've been playing with.
Thanks for your help.
Unfortunately, it does not generate a graph at all like what I'm looking
for. The graph that it generates looks a lot like:
http://tinypic.com/cqp
Which shows two lines. I would like a graph showing how the two variables
relate to each other over time. An example of this is at:
http://www.thestreet.com/comment/openbook/1332231.html
Notice how the relationship of both variables over time is related by one
connected set of line segments? They may cross each other, which is odd.
That's the part that I have been unable to make GD perform.
I have read the docuementation rather carefully several times and looked
at all of the examples in the "samples" directory. I don't see anything
that mentions a graph quite like what I'm looking for.
When I feed in an array of data like:
my @data = (
[ 3, 5, 6, 3, 1, 2, 5, ],
[ 5, 1, 2, 2, 3, 2, 7, ],
);
(which is just your data with the years removed)
in hopes of making 6 segments connecting those points, it seems to sort
the data on the first array reference and make a graph like:
http://tinypic.com/cqw
That's not what I'm looking for either.
Have I adequately described why the image that I'm looking for is not that
trivial? It's tough for me to describe. Please let me know if you can
think of a way to make GD display this kind of data, or if you have any
other suggestions.
Thanks for your help from a fellow Cornellian (alumnus)!
-pb
------------------------------
Date: 29 Apr 2004 23:14:18 GMT
From: Eric Bohlman <ebohlman@earthlink.net>
Subject: Re: generating time series graphs with perl
Message-Id: <Xns94DABA293976Febohlmanomsdevcom@130.133.1.4>
Po Boy <a5ufv8u02@sneakemail.com> wrote in
news:pan.2004.04.29.22.52.21.610489@sneakemail.com:
> Which shows two lines. I would like a graph showing how the two
> variables relate to each other over time. An example of this is at:
>
> http://www.thestreet.com/comment/openbook/1332231.html
>
> Notice how the relationship of both variables over time is related by
> one connected set of line segments? They may cross each other, which
> is odd. That's the part that I have been unable to make GD perform.
That type of graph is basically an augmented scatterplot. It looks like
what you need to do is first do an ordinary scatterplot, then modify the
colors of the first and last points in time sequence, and then add line
segments between the points in sequence (for the benefit of those with poor
color vision, you might want to add arrowheads on the line segments).
------------------------------
Date: 29 Apr 2004 23:16:30 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: generating time series graphs with perl
Message-Id: <slrnc9336d.9pf.mgjv@verbruggen.comdyn.com.au>
On Thu, 29 Apr 2004 17:52:21 -0500,
Po Boy <a5ufv8u02@sneakemail.com> wrote:
> On Thu, 29 Apr 2004 22:17:46 +0000, A. Sinan Unur wrote:
>
>> The following example can get you started. Please read the docs.
>>
>
> Which shows two lines. I would like a graph showing how the two variables
> relate to each other over time. An example of this is at:
>
> http://www.thestreet.com/comment/openbook/1332231.html
That sort of graph isn't possible with GD::Graph. I don't know off
hand of another package for Perl that does support that sort of thing.
GD::Graph would need quite some changes to be able to do that, so I
doubt I'll be able to add this any time soon.
> Notice how the relationship of both variables over time is related by one
> connected set of line segments? They may cross each other, which is odd.
> That's the part that I have been unable to make GD perform.
Note that GD and GD::Graph are not the same thing. GD is a low level
image drawing package. GD::Graph is a graphing package built on top of
GD and GD::Text.
Martien
--
|
Martien Verbruggen |
Trading Post Australia |
|
------------------------------
Date: Thu, 29 Apr 2004 18:28:43 -0500
From: Po Boy <a5ufv8u02@sneakemail.com>
Subject: Re: generating time series graphs with perl
Message-Id: <pan.2004.04.29.23.28.41.571259@sneakemail.com>
On Thu, 29 Apr 2004 23:16:30 +0000, Martien Verbruggen wrote:
>
> That sort of graph isn't possible with GD::Graph. I don't know off
> hand of another package for Perl that does support that sort of thing.
Yuk! well, thanks for your help. Maybe I'll see if I can get gnuplot or
octave or something to do it.
-snip-
> Note that GD and GD::Graph are not the same thing. GD is a low level
> image drawing package. GD::Graph is a graphing package built on top of
> GD and GD::Text.
>
> Martien
Oh yeah. I guess I was so concerned with describing my goofy little graphs
that I misspoke. Sorry.
Thanks for your help.
-pb
------------------------------
Date: 30 Apr 2004 02:13:55 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude>
Subject: Re: generating time series graphs with perl
Message-Id: <Xns94DAE228580Dasu1cornelledu@132.236.56.8>
Po Boy <a5ufv8u02@sneakemail.com> wrote in
news:pan.2004.04.29.22.52.21.610489@sneakemail.com:
> On Thu, 29 Apr 2004 22:17:46 +0000, A. Sinan Unur wrote:
>
>> The following example can get you started. Please read the docs.
>>
>
> That example does help me; it's similar to one I've been playing with.
> Thanks for your help.
>
> Unfortunately, it does not generate a graph at all like what I'm
> looking for. The graph that it generates looks a lot like:
>
> http://tinypic.com/cqp
>
> Which shows two lines. I would like a graph showing how the two
> variables relate to each other over time. An example of this is at:
>
> http://www.thestreet.com/comment/openbook/1332231.html
OK, I have to admit I did not check that url before my initial response.
I just took time-series to mean time-series.
> Notice how the relationship of both variables over time is related by
> one connected set of line segments? They may cross each other, which
> is odd. That's the part that I have been unable to make GD perform.
Well, my feeling is that chart was created in Excel (scatter-plot) and
then the relevant points and line segments were individually colored.
> I have read the docuementation rather carefully several times and
> looked at all of the examples in the "samples" directory. I don't see
> anything that mentions a graph quite like what I'm looking for.
Correct. GD::Graph does not handle scatter plots.
> Thanks for your help from a fellow Cornellian (alumnus)!
Hey, you are welcome.
Now, I do not know how much help the following would be but if you are on
a Windows system with Excel installed, you can automate the process of
generating these graphs to a certain extent by using something along the
lines of the following:
#! perl
use strict;
use warnings;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
Win32::OLE->Option(Warn => 3);
my $excel;
# use existing instance if Excel is already running
eval {
$excel = Win32::OLE->GetActiveObject('Excel.Application')
};
die Win32::OLE->LastError if $@;
unless (defined $excel) {
$excel = Win32::OLE->new('Excel.Application', sub { $_[0]->Quit; })
or die Win32::OLE->LastError;
}
my $book = $excel->Workbooks->Add or die Win32::OLE->LastError;
my $sheet = $book->Worksheets(1) or die Win32::OLE->LastError;
$sheet->Range('A1:A5')->{Value} = [ [ 1 ], [ 5 ], [ 3 ], [ 2 ], [ 4 ], ];
$sheet->Range('B1:B5')->{Value} = [ [ 2 ], [ 1 ], [ 3 ], [ 5 ], [ 4 ], ];
my $chart = $book->Charts->Add;
$chart->{ChartType} = xlXYScatterLines;
$chart->SeriesCollection->Item(1)->{Values} = $sheet->Range('B1:B5')->
{Value};
$chart->SeriesCollection->Item(1)->{XValues} = $sheet->Range('A1:A5')->
{Value};
$chart->SeriesCollection->Item(1)->Points(1)->{MarkerBackgroundColor} =
0x0000cc;
$chart->SeriesCollection->Item(1)->Points(1)->{MarkerForegroundColor} =
0x0000cc;
$chart->SeriesCollection->Item(1)->Points(5)->{MarkerBackgroundColor} =
0xcccc00;
$chart->SeriesCollection->Item(1)->Points(5)->{MarkerForegroundColor} =
0xcccc00;
__END__
It is not that good looking given the fact that I know next to nothing
about the topic.
--
A. Sinan Unur
1usa@llenroc.ude (reverse each component for email address)
------------------------------
Date: Thu, 29 Apr 2004 22:18:31 -0500
From: Po Boy <a5ufv8u02@sneakemail.com>
Subject: Re: generating time series graphs with perl
Message-Id: <pan.2004.04.30.03.18.29.432174@sneakemail.com>
On Fri, 30 Apr 2004 02:13:55 +0000, A. Sinan Unur wrote:
>
> OK, I have to admit I did not check that url before my initial response.
> I just took time-series to mean time-series.
I figured that may have been a problem. I still don't know a good, general
name for these types of graphs. They're not really parametric, either,
though they sometimes look like them.
>
> Now, I do not know how much help the following would be but if you are
> on a Windows system with Excel installed, you can automate the process
> of generating these graphs to a certain extent by using something along
> the lines of the following:
Well, no, it doesn't really help me on this one, but I've needed to do
something like that in Excel before, and I just may use that code on
another thing I do somewhat often. Thanks for showing me that stuff.
> It is not that good looking given the fact that I know next to nothing
> about the topic.
Thanks again for your help. I think I can get gnuplot to do a lot of this,
but the Chart::Graph module that I could use to talk to it looks rather
old.
-pb
------------------------------
Date: 29 Apr 2004 17:12:52 -0700
From: cedrat50@hotmail.com (Loup Blanc)
Subject: Re: Help! maintaining/upgrading Perl on Windows
Message-Id: <9b1ae155.0404291612.43302f6e@posting.google.com>
Thanks
------------------------------
Date: Thu, 29 Apr 2004 23:41:39 GMT
From: joe <jcharth@hotmail.com>
Subject: myfile.cgi?image.gif saved as myfile.cgi in mozilla?
Message-Id: <Xns94DAC811B1E5Fjosephthecianet@207.69.154.202>
Hi i have a pl file that prints
print "Content-type: application/octet-stream\n\n";
and then the output of a file
in ie it works fine the download.cgi?myzip.zip saves the file as myzip.zip
in mozilla however i get the wrong file name i get download.cgi
i tried doing http://www.domain.com/cgi-bin/download.cgi/myzip.zip and i
get the correct name but the contents dont look right any suggestions?
thanks.
------------------------------
Date: Thu, 29 Apr 2004 21:11:03 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: myfile.cgi?image.gif saved as myfile.cgi in mozilla?
Message-Id: <slrnc93ddn.441.tadmc@magna.augustmail.com>
joe <jcharth@hotmail.com> wrote:
> any suggestions?
Post Perl questions in the Perl newsgroup.
Post browser questions in a browser newsgroup, such as:
comp.infosystems.www.browsers.mac
comp.infosystems.www.browsers.misc
comp.infosystems.www.browsers.ms-windows
comp.infosystems.www.browsers.x
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 29 Apr 2004 20:15:10 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Newbie ... Net::SMTP module... where is it?
Message-Id: <tNKdnSNSecYNBwzdRVn-sw@adelphia.com>
Tassilo v. Parseval wrote:
> However, something that is right in principle is not
> invalided when it's said by the "wrong" chap.
Of course it isn't. But I didn't disagree with Robin because of who he his,
I disagreed because, IMHO, he gave bad advice.
Robin's comment that the OP might have been looking on the "wrong" cpan site
made no sense. The mirrors are all identical, and when the name of the
module is known (as it was in this case), the "by-module" hierarchy is just
as easy to use as the keyword search.
His advice was bogus, and I called him on it. I'm not playing favorites; In
another thread Robin gave accurate (if incomplete) advice, and in that
thread I told him so, and even gave him kudos for his improvement.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: 30 Apr 2004 00:34:11 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: Newbie ... Net::SMTP module... where is it?
Message-Id: <c6s6u3$ahk$1@canopus.cc.umanitoba.ca>
In article <tNKdnSNSecYNBwzdRVn-sw@adelphia.com>,
Sherm Pendley <spamtrap@dot-app.org> wrote:
:Robin's comment that the OP might have been looking on the "wrong" cpan site
:made no sense. The mirrors are all identical,
No they aren't. They -should- be, but in practice they aren't.
I do not -often- run into problems with mirrors having different
content, but it has happened to me. Network problems, disks get
corrupted, files get accidently deleted, propagation delays..
Discrepencies happen.
I make no claim that the discrepencies are a major problem,
but I do assert that the set of discrepencies that have happened
is non-empty.
--
"Infinity is like a stuffed walrus I can hold in the palm of my hand.
Don't do anything with infinity you wouldn't do with a stuffed walrus."
-- Dr. Fletcher, Va. Polytechnic Inst. and St. Univ.
------------------------------
Date: Thu, 29 Apr 2004 20:49:43 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Newbie ... Net::SMTP module... where is it?
Message-Id: <daCdndj3kLk0PwzdRVn-iQ@adelphia.com>
Walter Roberson wrote:
> I do not -often- run into problems with mirrors having different
> content, but it has happened to me. Network problems, disks get
> corrupted, files get accidently deleted, propagation delays..
> Discrepencies happen.
Yeah, but that kind of thing is just plain old bad luck. It's not the result
of having chosen the "wrong" mirror.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Thu, 29 Apr 2004 18:07:54 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: question about variable assignment - easy
Message-Id: <E7GdnfJxjvMm4Qzd4p2dnA@adelphia.com>
Robin wrote:
> "Danny" <dannywork5@hotmail.com> wrote in message
> news:Q8ekc.49141$Gd3.10837355@news4.srv.hcvlny.cv.net...
>>
>> my $test = 5;
>> $test = 5;
>
> you *can* use either one, but if you want to use strict "vars", you have
> to use the first one, because strict requires you to declare your
An incomplete answer, but at least that's better than a wrong answer. You're
improving.
> variables, see the documentation for strict.
See also:
perldoc -q scoping
perldoc -f my
perldoc -f our
perldoc perlsub (section "Private Variables via my()")
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Thu, 29 Apr 2004 23:18:05 GMT
From: "Danny" <dannywork5@hotmail.com>
Subject: Re: question about variable assignment - easy
Message-Id: <N2gkc.50966$Gd3.11236370@news4.srv.hcvlny.cv.net>
"Sherm Pendley" <spamtrap@dot-app.org> wrote in message
news:E7GdnfJxjvMm4Qzd4p2dnA@adelphia.com...
> Robin wrote:
>
> > "Danny" <dannywork5@hotmail.com> wrote in message
> > news:Q8ekc.49141$Gd3.10837355@news4.srv.hcvlny.cv.net...
> >>
> >> my $test = 5;
> >> $test = 5;
> >
> > you *can* use either one, but if you want to use strict "vars", you have
> > to use the first one, because strict requires you to declare your
>
> An incomplete answer, but at least that's better than a wrong answer.
You're
> improving.
>
> > variables, see the documentation for strict.
>
> See also:
>
> perldoc -q scoping
> perldoc -f my
> perldoc -f our
> perldoc perlsub (section "Private Variables via my()")
>
> sherm--
>
> --
> Cocoa programming in Perl: http://camelbones.sourceforge.net
> Hire me! My resume: http://www.dot-app.org
>
I appreciate all the responses.
Thanks very much
------------------------------
Date: Thu, 29 Apr 2004 21:25:27 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: Script to kill defunct and zombie processes
Message-Id: <5MydnY5MN6OWNgzdRVn-iQ@comcast.com>
Srini Vuggumudi wrote:
> Hello Friends,
>
> While browsing the messages in this new group, I found that a couple
> of people tried and successful in cleaning the defunct and zombie
> process using a PERL or shell script.
>
> If you have a working script that cleans defuncts and zombies , could
> you please post it? I appreciate your help. I do not have experience
> with SIGNALS in PERL.
>
> Also, here is my problem:
>
> I have an apache/mysql/perl/Linux environment running cgis. My
> webserver runs fine for a couple of days. After a month or so, it
> starts running really slow (if someone try to access the URL, the
> response will be slow). When the webserver responses are slow, If I do
> ps -aef, I do see a lot of defunts. Aslo, if I do "top", I do see the
> zombies count as 60 - 70. I believe these defunts and zombies may be
> taking my webserver's resources and making it run slow.
>
> Any suggesstions?
>
> If you have a working script that cleans defuncts and zombies , could
> you please post it? I appreciate your help.
>
> Thank you.
>
> Sincerely,
>
> Srini
a) your zombies are not using any resources becuase zombies are just
processes that have terminated but still need to report their return
codes to their parents. Zombies never use *any* resources except a
slot in the process table, and 60 or 70 zombies aren't going to make
a significant impact on it.
b) You can't run a script to "clean" zombies; zombies are produced
by faulty code in the parent. They will *not* go away until the parent
collects their return code, normally by using some variety of wait().
You need to fix the code that forks these processes. If you're using
perl to create these processes, then the NG might be able to help you
debug it, but not until we see your code.
c) It's perl (or Perl for the language in the abstract), not PERL.
--
Christopher Mattern
"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
------------------------------
Date: 29 Apr 2004 20:21:44 -0700
From: rook_5150@yahoo.com (Bryan Castillo)
Subject: Re: Script to kill defunct and zombie processes
Message-Id: <1bff1830.0404291921.2875e516@posting.google.com>
srini@rocketmail.com (Srini Vuggumudi) wrote in message news:<ac3f7819.0404291152.7256df16@posting.google.com>...
> Hello Friends,
>
> While browsing the messages in this new group, I found that a couple
> of people tried and successful in cleaning the defunct and zombie
> process using a PERL or shell script.
>
> If you have a working script that cleans defuncts and zombies , could
> you please post it? I appreciate your help. I do not have experience
> with SIGNALS in PERL.
>
> Also, here is my problem:
>
> I have an apache/mysql/perl/Linux environment running cgis. My
> webserver runs fine for a couple of days. After a month or so, it
> starts running really slow (if someone try to access the URL, the
> response will be slow). When the webserver responses are slow, If I do
> ps -aef, I do see a lot of defunts. Aslo, if I do "top", I do see the
> zombies count as 60 - 70. I believe these defunts and zombies may be
> taking my webserver's resources and making it run slow.
>
> Any suggesstions?
>
> If you have a working script that cleans defuncts and zombies , could
> you please post it? I appreciate your help.
>
This works, but I wouldn't suggest you use it :~)
use strict;
use warnings;
use IO::File;
my %bad_parents;
my $pipe = IO::File->new("ps -ef |") || die $!;
while (my $line = <$pipe>) {
if ($line =~ /^\S+\s+(\d+)\s+(\d+)\s+.*<defunct>/) {
my ($pid, $ppid) = ($1,$2);
print "Found zombie: $pid\n";
$bad_parents{$ppid} = 1;
}
}
$pipe->close;
while (my ($ppid,$val) = each %bad_parents) {
print "Killing $ppid\n";
kill KILL=>$ppid;
}
> Thank you.
>
> Sincerely,
>
> Srini
------------------------------
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 V10 Issue 6490
***************************************