[30318] in Perl-Users-Digest
Perl-Users Digest, Issue: 1561 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 20 14:14:28 2008
Date: Tue, 20 May 2008 11:14:19 -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 Tue, 20 May 2008 Volume: 11 Number: 1561
Today's topics:
Re: Perl 6 <john@castleamber.com>
Re: Perl 6 <gordon@ .>
Re: Perl software? <amerar@iwc.net>
Re: Perl software? <tzz@lifelogs.com>
Re: Regexp: non greedy? <jimsgibson@gmail.com>
Re: Regexp: non greedy? xhoster@gmail.com
Re: script to find the files with very long names <nospam-abuse@ilyaz.org>
Re: select ethernet card for socket? <smallpond@juno.com>
Re: Strawberry <RedGrittyBrick@SpamWeary.foo>
Re: Strawberry <1usa@llenroc.ude.invalid>
Re: Strawberry <brian.helterline@hp.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 20 May 2008 15:23:35 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Perl 6
Message-Id: <Xns9AA469B8A7951castleamber@130.133.1.4>
"Gordon Etly" <gordon@ .> wrote:
> John Bokma wrote:
>> "Gordon Etly" <g.etly@bentsys.INVALID.com> wrote:
>> > John Bokma wrote:
[ Usenet ]
>> People who want to help often get carried away: they have reserved a
>> certain amount of time to post every day, and if there is nothing to
>> post, they look closer at other posts. At least that's how it works
>> for me.
>
> That isn't an excuse for post in a needlessly negative manner. It
> doesn't serve anyone and too often it takes threads in the wrong
> direction.
It wasn't an excuse, but an explanation of at least how I think I
behave.
>> <http://blog.agoraproduction.com/index.php?/archives/19-Installing-PHP
>> 6- F or-beginners.html>
>>
>> Written almost 1.5 years ago.
>
> That doesn't change the fact the newest I can find is 5.2.6, so I have
> conclude that that article is mistaken.
http://snaps.php.net/
A simple search with Google could have shown you that the article was
not mistaken.
--
John
http://johnbokma.com/perl/
------------------------------
Date: Tue, 20 May 2008 10:41:50 -0700
From: "Gordon Etly" <gordon@ .>
Subject: Re: Perl 6
Message-Id: <69ggqvF32adjpU1@mid.individual.net>
John Bokma wrote:
> "Gordon Etly" wrote:
> > John Bokma wrote:
> > > "Gordon Etly" <g.etly@bentsys.INVALID.com> wrote:
> > > > John Bokma wrote:
> [ Usenet ]
> > > People who want to help often get carried away: they have reserved
> > > a
> > > certain amount of time to post every day, and if there is nothing
> > > to
> > > post, they look closer at other posts. At least that's how it
> > > works
> > > for me.
> > That isn't an excuse for post in a needlessly negative manner. It
> > doesn't serve anyone and too often it takes threads in the wrong
> > direction.
> It wasn't an excuse, but an explanation of at least how I think I
> behave.
But you were talking about your behavior, you were talking about (your
opinion of) the behavior of "People who want to help", not yourself. The
way you wrote it is very well an excuse for why they act the way they
do, but I'm sorry, it doesn't make such negative behavior it anymore
right.
> > > <http://blog.agoraproduction.com/index.php?/archives/19-Installing-PHP
> > > 6- F or-beginners.html>
> > >
> > > Written almost 1.5 years ago.
> > That doesn't change the fact the newest I can find is 5.2.6, so I
> > have conclude that that article is mistaken.
> http://snaps.php.net/
> A simple search with Google could have shown you that the article was
> not mistaken.
Ok, granted, but keep in mind that PHP 6 is still in development; no
stable release is available, so it would seem we were both right, and I
stand corrected :)
I am surprised they don't actually make any mention of PHP 6 on the main
download page, though there is a link to snaps.php.net on the left hand
sidebar.
--
G.Etly
------------------------------
Date: Tue, 20 May 2008 07:20:25 -0700 (PDT)
From: "amerar@iwc.net" <amerar@iwc.net>
Subject: Re: Perl software?
Message-Id: <3c66cbd7-35e4-49d2-8c19-1396ea6e6386@26g2000hsk.googlegroups.com>
On May 19, 3:58 pm, xhos...@gmail.com wrote:
> "ame...@iwc.net" <ame...@iwc.net> wrote:
> > Hi,
>
> > we have some data in a MySQL database. We're looking for a way to
> > somehow query that data
>
> DBI and DBD::mysql
>
> > and present it in a line graph
>
> GD::Graph, or Image::Magick, or Chart::Graph::Gnuplot, etc.
>
> You might be able to use DBIx::Chart to combine both the selecting
> and the graphing in fell swoop. Never used it myself, and I tend to
> prefer focussed tools rather than one thing to do everything.
>
> > which will be
> > emailed to the users......I'm assuming that the document will be an
> > HTML document.
>
> For the simple type of mail I do, I just open a pipe to the mail program,
> but there are all kinds of modules that can help with more complicated
> stuff. HTML usually refers one to a URL to get the image, so if you need
> the image itself to be embedded in the mail, you probably need MIME or
> something more complicated than just plain HTML.
>
> perldoc -q mail
> How do I use MIME to make an attachment to a mail message?
>
> This suggests MIME::Lite
>
> 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.
GD:Graph looks like a pain in the ass to install. There seems to be
so many libraries and modules that are needed. I may look at
Chart::Graph::Gnuplot instead and see if that is easier.......
------------------------------
Date: Tue, 20 May 2008 10:50:23 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Perl software?
Message-Id: <863aodq8jk.fsf@lifelogs.com>
On Mon, 19 May 2008 13:40:35 -0700 (PDT) "amerar@iwc.net" <amerar@iwc.net> wrote:
an> we have some data in a MySQL database. We're looking for a way to
an> somehow query that data and present it in a line graph which will be
an> emailed to the users......I'm assuming that the document will be an
an> HTML document.
an> Are there utilities or Perl modules for this? We're running Linux
an> (Cent-OS).
While you can use Class::DBI or Rose::DB::Object to query the database
and GD::* to plot the data, you may want to look at reporting tools that
are written to do exactly this task.
For example, rrdtool is very good for generating line graphs of any
data. If it's complicated or if you need a GUI, you can try Cacti,
which is a good wrapper around it. In either case, all you write is the
data retrieval code (in Perl or in another language), but then rrdtool
or Cacti+rrdtool take care of organizing it by date and time, plot
details, etc.
There are also report generators that take a query and do everything
else for you. That's an even easier option if it fits your needs.
Ted
------------------------------
Date: Tue, 20 May 2008 09:49:40 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: Regexp: non greedy?
Message-Id: <200520080949406235%jimsgibson@gmail.com>
In article
<3cfed297-ddee-46e1-bcf0-cc93a4cac9a1@b1g2000hsg.googlegroups.com>,
Oliver <oli.meister@gmail.com> wrote:
> Dear all
>
> I know, that its probably a little boring for the "pro"s to answer
> question about regexp...
> ...but, bevor I start to cry I'd like to ask for a helping hand.
>
> I have the following regexp:
> $message =~ m/(\:59\:(.+)?(\n\:\d\d\:))/s ;
You need to put the '?' directly after the '+', not after the group. If
it is after the ')', it applies to the group ("zero or one of '(.+') )
and does not modify the '+':
$message =~ m/(\:59\:(.+?)(\n\:\d\d\:))/s ;
--
Jim Gibson
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
http://www.usenet.com
------------------------------
Date: 20 May 2008 16:52:53 GMT
From: xhoster@gmail.com
Subject: Re: Regexp: non greedy?
Message-Id: <20080520125254.012$86@newsreader.com>
Oliver <oli.meister@gmail.com> wrote:
> Dear all
>
> I know, that its probably a little boring for the "pro"s to answer
> question about regexp...
> ...but, bevor I start to cry I'd like to ask for a helping hand.
>
> I have the following regexp:
> $message =~ m/(\:59\:(.+)?(\n\:\d\d\:))/s ;
The ? above is the "1 or 0 quantifier", not the greedy modifier, as it does
not immediately follow another quantifier. It is quantifying the entire
(.+) expression. To get what you want, you need to move ? inside the
parenthesis.
(.+?)
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: Tue, 20 May 2008 17:21:30 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: script to find the files with very long names
Message-Id: <g0v1aq$mv3$1@agate.berkeley.edu>
[A complimentary Cc of this posting was NOT [per weedlist] sent to
Jürgen Exner
<jurgenex@hotmail.com>], who wrote in article <d94434hooi2jh36ger39usqo47ro1vhtfo@4ax.com>:
> use strict; use warnings;
> use File::Find;
> sub wanted{print "$_\n" if length>26;}
> find(\&wanted, '.');
Wrong. You do not want to use $_ there (or use 'nochdir'). Better, use
pfind . "length > 26"
Hope this helps,
Ilya
------------------------------
Date: Tue, 20 May 2008 13:10:40 -0400
From: smallpond <smallpond@juno.com>
Subject: Re: select ethernet card for socket?
Message-Id: <a462e$48330620$7664@news.teranews.com>
Susanne West wrote:
>
>
> how can i select an specific ethernet card for a
> socket, when i have multiple ethernet-cards (lan,
> wireless) installed?
>
> i have two cards, configured for two different subnets:
> wireless: 192.168.50.x
> lan: 2.1.1.x
> and want to open a socket and broadcast to 2.1.1.x but
> without touching the wireless-settings. currently, i
> do:
>
> ----------------------------------------------
> my $sendsocket = new IO::Socket::INET(
> LocalHost => '2.1.1.1',
> LocalPort => '6454',
> PeerAddr => '2.255.255.255',
> PeerPort => '6454',
> Proto => 'udp',
> Broadcast => 1
> ) || die "[ERROR CREATING SOCKET] $!\n";
> $sendsocket->sockopt(SO_BROADCAST, 1);
> ----------------------------------------------
>
> which causes the wireless-connection to collapse...
> i guess i can do something with 'bind' but can't
> figure out how to identify the correct card...
>
>
> thanks a ton!
>
>
Is your LAN really class A or should your broadcast address be 2.1.1.255?
Try first to create a socket without the broadcast to see if that is
somehow causing havoc.
-S
** Posted from http://www.teranews.com **
------------------------------
Date: Tue, 20 May 2008 15:39:28 +0100
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: Re: Strawberry
Message-Id: <4832e2a2$0$2479$da0feed9@news.zen.co.uk>
A. Sinan Unur wrote:
> RedGrittyBrick <RedGrittyBrick@SpamWeary.foo> wrote in
> news:48329f33$0$10629$fa0fcedb@news.zen.co.uk:
>
>> sanozuke wrote:
>>> I put in the command line perl hello.pl and perl perl40.pl and a pop
>>> up very quicly appear's, just show up and don't gives time to see
>>> anything.
>>> What is that is going wrong
>> Without knowing the contents of the hello.pl or perl40.pl, which you
>> are hiding from us, I can only guess.
>
> And my guess is the OP is not running the programs from the cmd shell
> command line but instead typing
>
> perl hello.pl
>
> in Start -> Run
>
Ah yes. In which case the OP might want to add to the end of the
programs something not entirely unlike:
print "Press the enter key to finish: ";
my $farewell = <>;
--
RGB
------------------------------
Date: Tue, 20 May 2008 14:48:45 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Strawberry
Message-Id: <Xns9AA46DFC7F609asu1cornelledu@127.0.0.1>
RedGrittyBrick <RedGrittyBrick@SpamWeary.foo> wrote in
news:4832e2a2$0$2479$da0feed9@news.zen.co.uk:
> A. Sinan Unur wrote:
>> RedGrittyBrick <RedGrittyBrick@SpamWeary.foo> wrote in
>> news:48329f33$0$10629$fa0fcedb@news.zen.co.uk:
>>
>>> sanozuke wrote:
>>>> I put in the command line perl hello.pl and perl perl40.pl and a
>>>> pop up very quicly appear's,
...
>>> Without knowing the contents of the hello.pl or perl40.pl, which you
>>> are hiding from us, I can only guess.
>>
>> And my guess is the OP is not running the programs from the cmd shell
>> command line but instead typing
>>
>> perl hello.pl
>>
>> in Start -> Run
>>
>
> Ah yes. In which case the OP might want to add to the end of the
> programs something not entirely unlike:
>
> print "Press the enter key to finish: ";
> my $farewell = <>;
That would not work if perl cannot locate hello.pl which is likely to
happen if one runs
perl hello.pl
from Start -> Run (without providing the full path to hello.pl)
I thoroughly recommend opening a cmd.exe shell and testing command line
programs from the command line in that shell.
The Command Prompt Here power toy as well as Console2 make life simpler.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Tue, 20 May 2008 10:04:42 -0700
From: Brian Helterlilne <brian.helterline@hp.com>
Subject: Re: Strawberry
Message-Id: <g0v0bb$8nm$1@usenet01.boi.hp.com>
RedGrittyBrick wrote:
> Ah yes. In which case the OP might want to add to the end of the
> programs something not entirely unlike:
>
> print "Press the enter key to finish: ";
> my $farewell = <>;
>
>
It's better to wrap that in a BEGIN block so you see any compilation
errors as well.
--
-brian
------------------------------
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 1561
***************************************