[28755] in Perl-Users-Digest
Perl-Users Digest, Issue: 10119 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 5 03:05:49 2007
Date: Fri, 5 Jan 2007 00:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 5 Jan 2007 Volume: 10 Number: 10119
Today's topics:
Re: Coderefs and objects (on aioe)
Re: Elegant equivalent to this regex? <sherifffruitfly@gmail.com>
Re: Elegant equivalent to this regex? <glex_no-spam@qwest-spam-no.invalid>
Re: Elegant equivalent to this regex? (on aioe)
Re: Elegant equivalent to this regex? <DJStunks@gmail.com>
Re: Elegant equivalent to this regex? <john@castleamber.com>
Re: Elegant equivalent to this regex? <uri@stemsystems.com>
Re: Elegant equivalent to this regex? <purlgurl@purlgurl.net>
Re: Elegant equivalent to this regex? usenet@DavidFilmer.com
Re: Elegant equivalent to this regex? <spamtrap@dot-app.org>
Re: Elegant equivalent to this regex? <uri@stemsystems.com>
Re: Elegant equivalent to this regex? <purlgurl@purlgurl.net>
Re: Elegant equivalent to this regex? <purlgurl@purlgurl.net>
Re: Elegant equivalent to this regex? <purlgurl@purlgurl.net>
Re: incorrect behaviour in use clause specifying Class: <sisyphus1@nomail.afraid.org>
Math::GMP make test fails. <stahl.karl@gmail.com>
Re: Math::GMP make test fails. <spamtrap@dot-app.org>
Re: Net::SSH::Perl question <kanuri.sai-kiran@in.standardchartered.com>
new CPAN modules on Fri Jan 5 2007 (Randal Schwartz)
Perl examples in many other languages <paddy3118@netscape.net>
Re: uninitialized value warnings and run time <uri@stemsystems.com>
Re: uninitialized value warnings and run time <uri@stemsystems.com>
Re: uninitialized value warnings and run time <nospam@somewhere.com>
Re: uninitialized value warnings and run time <uri@stemsystems.com>
Re: Unsecured scripts and site hacking? perlerogdl@hotmail.com
Re: which email module - MIME::LITE, Email::Send, other <nobody@dev.null>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 04 Jan 2007 17:36:02 -0600
From: "Mumia W. (on aioe)" <paduille.4060.mumia.w@earthlink.net>
Subject: Re: Coderefs and objects
Message-Id: <enk627$e7o$1@aioe.org>
On 01/04/2007 02:02 PM, Adam Flott wrote:
> I'm not entirely sure how code references work within objects and talking to
> other objects.
> [...]
>
> A good thorough example or link would be greatly appreciated.
>
>
> Thanks,
>
> Adam
The Errmode option expects you to give it a simple function, but
err_handler is a method, so you can't use it directly. Instead, use it
indirectly by calling err_handler from within an anonymous subroutine:
This example is written for brevity not beauty:
#!/usr/bin/perl
use strict;
use warnings;
my $obj = new Apackage;
$obj->open;
$obj->close;
exit;
####################################
package Apackage;
use Net::Telnet;
use Data::Dumper;
sub new {
bless({}, shift());
}
sub open {
my ($self) = @_;
my $th = new Net::Telnet (
Host => 'localhost',
Errmode => [ sub { $self->err_handler(@_) }, 'Can\'t', 'connect' ],
);
$self->{th} = $th;
}
sub err_handler {
my ($self, @args) = @_;
print Dumper(\@args);
die("Die-Error: @args");
}
sub close {
shift()->{th}->close;
}
__HTH__
--
paduille.4060.mumia.w@earthlink.net
Windows Vista and your freedom in conflict:
http://www.badvista.org/
------------------------------
Date: 4 Jan 2007 15:10:31 -0800
From: "sherifffruitfly" <sherifffruitfly@gmail.com>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <1167952231.835265.10870@42g2000cwt.googlegroups.com>
Mirco Wahab wrote:
> You didn't specify how *exact* is your matching requirement,
> eg. if you have data like this:
Yah - the reason I left it vague is because what I *want* is best
described in English as
"de-pretty-printing-numerical-csv-file-entries-that-shouldn't-have-been-pretty-printed-in-the-first-place".
As I expect there to be many ways to skin that particular cat, I didn't
want to unnecessarily lock-in one particular approach or whatever. Does
that make sense?
Thanks,
cdj
------------------------------
Date: Thu, 04 Jan 2007 18:05:32 -0600
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <459d95bd$0$501$815e3792@news.qwest.net>
sherifffruitfly wrote:
> J. Gleixner wrote:
>
>> Provide examples of your data, expected results, and what you've
>> tried. If you post a short example with all of those, it'll
>> be much easier to help.
>
> Just in case I typo'd my regex, here it is again, copy/pasted straight
> from Expresso (regex testing/analysis tool):
>
> \"(?<one>\d{1,3}),(?<two>\d{1,3}),(?<three>\d{1,3})\"|\"(?<one>\d{1,3}),(?<two>\d{1,3})\"
OK.. so how are you using it?? Show some actual code.
>
> This is intended for use against csv files - there may be stuff in the
> regex that exploits this assumption - I forget.
>
> Sample text:
>
> Oct
> 2005,6.02,211.9,"1,573,958",31.9,"135,191",722.8676,67.3,19.1,18.1,19.2,18.4,18.4,,
> Representative sample of matches/captures:
>
> match <whole> <one> <two>
> <three>
> "1,573,958" "1,573,958" 1 573
> 958
> "135,191" "135,191" 135 191
> (empty)
> etc.
>
> In my *ideal* regex, there would be just 1 capture from a given match:
> the concatenation of the numerically named capture group values
> (1573958 or 135191, in the above). Achieving th effect of this ideal
> result is trivial from what my regex *does* provide, however.
>
>
>> The requirements and regular expression you posted don't coincide.
>
> I included "qualifier-words" (e.g., "essentially") in my OP that were
> intended to make your statement false. I may have failed. Also I didn't
> explicitly state an obvious limitation of my regex: that it only
> "works" for quoted-comma'd numbers consisting of either 2 or 3 blocks
> (e.g., it fails for numbers in the billions); that suffices for my
> needs
>
> A regex that satisfies my ideal situation would be great. But if that's
> not possible, simply a more elegant more-or-less-equivalent of my own
> would be greatly appreciated. There are many possible ways to
> de-pretty-print - I just want an elegant one.
Maybe you're simply after what's captured by ()??
$_ = q{"123,456,789"};
if ( /^"(\d{1,3}),(\d{1,3}),?(\d{1,3})?"$/ )
{
print "$1$2$3\n";
}
>
> Does that help?
No.. where's the short script??
To be safe, use one of the CSV modules available from CPAN. (e.g.
Text::CSV::Simple)
Parse data.
Iterate through data, looking at each item/cell.
If the item contains a ',', remove it and if the value is > 999, then
do whatever you want with it.
if ( /,/ )
{
my $entry = $_;
$entry =~ tr/,//d;
print $entry, "\n" if $entry > 999;
}
or if the item matches above expression, then do whatever you want
with $1, $2, and $3.
if ( /^"(\d{1,3}),(\d{1,3}),?(\d{1,3})?"$/ )
{
print "$1$2$3\n";
}
Or, if you're really sure of your data...
my $str =<<EOT;
Oct
2005,6.02,211.9,"1,573,958",31.9,"135,191",722.8676,67.3,19.1,18.1,19.2,18.4,18.4,,
Nov
2005,6.02,212.8,"1,573,958",32.2,"135,191",722.8676,67.3,19.2,18.2,19.2,15.7,15.7,,
Dec
2005,6.02,213.6,"1,570,805",32.5,"136,005",723.228,66.2,19.2,18.2,19.3,13.3,13.3,,
EOT
$str =~ s/,"(\d{1,3}),(\d{1,3}),?(\d{1,3})?",/,$1$2$3,/g;
print $str;
Oct
2005,6.02,211.9,1573958,31.9,135191,722.8676,67.3,19.1,18.1,19.2,18.4,18.4,,
Nov
2005,6.02,212.8,1573958,32.2,135191,722.8676,67.3,19.2,18.2,19.2,15.7,15.7,,
Dec
2005,6.02,213.6,1570805,32.5,136005,723.228,66.2,19.2,18.2,19.3,13.3,13.3,,
------------------------------
Date: Thu, 04 Jan 2007 17:46:29 -0600
From: "Mumia W. (on aioe)" <paduille.4060.mumia.w@earthlink.net>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <enk628$e7o$2@aioe.org>
On 01/04/2007 03:47 PM, sherifffruitfly wrote:
> [...]
> (2) Capture all of the digits, leaving the quotes and commas for the
> garbage man. For example:
>
> " "123, 456, 789" "
> should in some fashion capture
> "123456789"
> [...]
my $string = "123, 456, 789";
my $num = join('',$string =~ /\d+/g);
print "num = $num\n";
--
paduille.4060.mumia.w@earthlink.net
Windows Vista and your freedom in conflict:
http://www.badvista.org/
------------------------------
Date: 4 Jan 2007 16:33:29 -0800
From: "DJ Stunks" <DJStunks@gmail.com>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <1167957209.341332.263000@38g2000cwa.googlegroups.com>
sherifffruitfly wrote:
> usenet@DavidFilmer.com wrote:
> > sherifffruitfly wrote:
> > > (2) Capture all of the digits, leaving the quotes and commas for the
> > > garbage man.
> >
> > If you just want to strip out the non-numerics why futz with regexps?
> > Why not just use s/// to get rid of the non-numerics?
> >
> > my $original = " 123, 456, 789 ' ";
> > (my $numbers = $original) =~ s/\D//g ;
> > print $numbers;
>
> Because I want to use regex, please.
that DOES use a regular expression, but why would you insist on a
particular method anyway? is this a homework assignment? do you want
a solution or don't you?
> If you don't wish to help me with my question, but prefer to answer
> only your own instead, that's perfectly fine, of course.
no need to get snotty.
-jp
------------------------------
Date: 5 Jan 2007 01:10:59 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <Xns98AEC323CA4C4castleamber@130.133.1.4>
"sherifffruitfly" <sherifffruitfly@gmail.com> wrote:
> Mirco Wahab wrote:
>
>> You didn't specify how *exact* is your matching requirement,
>> eg. if you have data like this:
>
> Yah - the reason I left it vague is because what I *want* is best
> described in English as
> "de-pretty-printing-numerical-csv-file-entries-that-shouldn't-have-been
> -pretty-printed-in-the-first-place".
Use a module that reads and parses a CSV file
for each column in a row that contains a pretty-printed number turn it
into a non-pretty printed number.
In fact there was no need to mention a CSV file at all, you should be
smart enough to find the right module for that one. Your problem could be
reduced to:
I have a number that can be written as:
example(s)
How can I turn this into a normal number.
s/,// seems to be the right answer.
--
John Experienced Perl programmer: http://castleamber.com/
Perl help, tutorials, and examples: http://johnbokma.com/perl/
------------------------------
Date: Thu, 04 Jan 2007 22:49:35 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <x7r6uaceuo.fsf@mail.sysarch.com>
>>>>> "MW(a" == Mumia W (on aioe) <paduille.4060.mumia.w@earthlink.net> writes:
MW(a> On 01/04/2007 03:47 PM, sherifffruitfly wrote:
>> [...]
>> (2) Capture all of the digits, leaving the quotes and commas for the
>> garbage man. For example:
>> " "123, 456, 789" "
>> should in some fashion capture
>> "123456789"
>> [...]
MW(a> my $string = "123, 456, 789";
MW(a> my $num = join('',$string =~ /\d+/g);
MW(a> print "num = $num\n";
bah!
my( $num = $string ) =~ tr/0-9//dc ;
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Thu, 04 Jan 2007 20:35:23 -0800
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <459DD58B.3070507@purlgurl.net>
Uri Guttman wrote:
>>>>>> MW writes:
> MW wrote:
> >> (2) Capture all of the digits, leaving the quotes and commas for the
> >> garbage man. For example:
> >> " "123, 456, 789" "
> >> should in some fashion capture
> >> "123456789"
> my $string = "123, 456, 789";
> my $num = join('',$string =~ /\d+/g);
> print "num = $num\n";
> my( $num = $string ) =~ tr/0-9//dc ;
Can't declare scalar assignment in "my" at test.pl line 5, near ") =~"
Purl Gurl
------------------------------
Date: 4 Jan 2007 22:11:44 -0800
From: usenet@DavidFilmer.com
Subject: Re: Elegant equivalent to this regex?
Message-Id: <1167977504.081965.302190@s34g2000cwa.googlegroups.com>
Purl Gurl wrote:
> > my( $num = $string ) =~ tr/0-9//dc ;
> Can't declare scalar assignment in "my" at test.pl line 5, near ") =~"
I think Uri meant
(my $num = $string ) =~ tr/0-9//dc ;
--
David Filmer (http://DavidFilmer.com)
------------------------------
Date: Fri, 05 Jan 2007 01:22:34 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <m2ps9u802d.fsf@Sherm-Pendleys-Computer.local>
Purl Gurl <purlgurl@purlgurl.net> writes:
> Purl Gurl
Sigh. You again? Time to update the killfile, I see...
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Fri, 05 Jan 2007 02:02:25 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <x7lkkic5xa.fsf@mail.sysarch.com>
>>>>> "u" == usenet <usenet@DavidFilmer.com> writes:
u> Purl Gurl wrote:
>> > my( $num = $string ) =~ tr/0-9//dc ;
>> Can't declare scalar assignment in "my" at test.pl line 5, near ") =~"
u> I think Uri meant
u> (my $num = $string ) =~ tr/0-9//dc ;
yeah. my point was to show tr is better for this than a regex. the my
stuff was just boilerplate code.
and moronzilla needs to be locked up again. why did they let it escape
the loonie bin?
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Thu, 04 Jan 2007 23:12:28 -0800
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <459DFA5C.7020709@purlgurl.net>
Sherm Pendley wrote:
> Purl Gurl writes:
> Sigh. You again? Time to update the killfile, I see...
You should killfile me, immediately. You and others will
not benefit from learning of broken code so frequently
provided here, by regular participants whom claim to be
Perl professionals yet make beginner level mistakes.
Be sure to announce your killfiling me so your friends
here will learn you are a very macho man who never wastes
time of readers by writing childish articles.
Purl Gurl
------------------------------
Date: Thu, 04 Jan 2007 23:40:40 -0800
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <459E00F8.5070902@purlgurl.net>
usenet@DavidFilmer.com wrote:
> Purl Gurl wrote:
>>> my( $num = $string ) =~ tr/0-9//dc ;
>> Can't declare scalar assignment in "my" at test.pl line 5, near ") =~"
> I think Uri meant
> (my $num = $string ) =~ tr/0-9//dc ;
Possibly so. However I would be remiss to comment upon
what Uri is thinking; I am not an internet mind reader.
Nonetheless, declaring a lexical "my" on a global level
is highly illogical and reduces script efficiency. Use
of a lexical declaration is logical when employed within
an embedded block or within a subroutine, this is, when
employed correctly, appropriately and tested to exemplify
memory savings improves overall script efficiency.
timethese (1000000,
{
'PurlGurl' =>
'$input = "123, 456, 789";
($output = $input) =~ tr/0-9//dc;',
'Uri' =>
'my ($string) = "123, 456, 789";
(my $num = $string) =~ tr/0-9//dc;',
} );
Benchmark: timing 1000000 iterations of PurlGurl, Uri...
PurlGurl: 2 wallclock secs ( 1.87 usr + 0.00 sys = 1.87 CPU) @ 534759.36/s(n=1000000)
Uri: 3 wallclock secs ( 3.08 usr + 0.00 sys = 3.08 CPU) @ 324675.32/s(n=1000000)
Easy for readers to surmise use of lexical declarations on
a global scale reduces script efficiency an average of
thirty-three percent, for this specific case example.
Purl Gurl
------------------------------
Date: Thu, 04 Jan 2007 23:45:59 -0800
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: Elegant equivalent to this regex?
Message-Id: <459E0237.30503@purlgurl.net>
Uri Guttman wrote:
>>>>>> usenet writes:
>> Purl Gurl wrote:
>>>> my( $num = $string ) =~ tr/0-9//dc ;
>>> Can't declare scalar assignment in "my" at test.pl line 5, near ") =~"
>> I think Uri meant
>> (my $num = $string ) =~ tr/0-9//dc ;
> and moronzilla needs to be locked up again. why did they let it escape
> the loonie bin?
Rather the reflection upon your Perl skills having
a "moron" from a "loonie bin" correcting your mistakes.
Purl Gurl
------------------------------
Date: Fri, 5 Jan 2007 16:40:19 +1100
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: incorrect behaviour in use clause specifying Class::Std version in perl 5.8.8
Message-Id: <459de61e$0$16553$afc38c87@news.optusnet.com.au>
"Julien" <julien.ollivier@gmail.com> wrote in message
news:1167931263.657180.49090@51g2000cwl.googlegroups.com...
> Hi,
>
> After discovering that I was accidentally using Class::Std version
> 0.0.2 instead of 0.0.8, I tried to specify the version in the use
> clause to detect such problems in the future. However, perl 5.8.8
> doesn't seem to handle this properly.
I think it's conceivable that the problem *could* be a bug in the version
module. (I'm assuming that you're using different versions of version.pm in
the respective builds of perl.)
Try using the same version of version.pm in both your perl 5.8.6 and perl
5.8.8. If perl 5.8.6 and 5.8.8 still produce different results, then I'll
have to concede that it's probably a bug in perl 5.8.8. Otherwise, it's
probably a bug in version.pm.
Cheers,
Rob
------------------------------
Date: 4 Jan 2007 22:25:01 -0800
From: "Ishmael" <stahl.karl@gmail.com>
Subject: Math::GMP make test fails.
Message-Id: <1167978301.550730.80680@11g2000cwr.googlegroups.com>
I am trying to compile the Math::GMP module locally (not as root). I
have successfully built gmp-4.2.1, but am having trouble getting the
Perl wrapper to work. I am doing the following:
perl Makefile.PL PREFIX=/home/kstahl/PERL/Math-GMP-2.04
Here, I receive the following messages:
Note (probably harmless): No library found for -lgmp
Writing Makefile for Math::GMP
Now in order to point Make in the right direction to find my
installation of gmp, I edited the Makefile, and added the correct path
to CCFLAGS, i.e. the last entry below:
CCFLAGS = -I/usr/local/include/db3 -I/usr/local/include
-I/apps/supported/include -I/home/kstahl/PERL/gmp-4.2.1
Then I run make and get these messages:
cc -c -I/usr/local/include/db3 -I/usr/local/include
-I/apps/supported/include
-I/home/kstahl/PERL/gmp-4.2.1 -O -DVERSION=\"2.04\"
-DXS_VERSION=\"2.04\"
-KPIC "-I/apps/gnu/perl-5.6.1/lib/sol2.sun4/CORE" GMP.c
Running Mkbootstrap for Math::GMP ()
chmod 644 GMP.bs
rm -f blib/arch/auto/Math/GMP/GMP.so
LD_RUN_PATH="" cc -G -L/usr/local/lib/db3 -L/usr/local/lib
-L/apps/supported/lib/sol2.sun4 GMP.o -o
blib/arch/auto/Math/GMP/GMP.so
chmod 755 blib/arch/auto/Math/GMP/GMP.so
cp GMP.bs blib/arch/auto/Math/GMP/GMP.bs
chmod 644 blib/arch/auto/Math/GMP/GMP.bs
Manifying blib/man3/Math::GMP.3pm
It looks like everything worked, but then I run 'make test' and get the
following errors:
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/gmppm....Can't load
'/home/kstahl/PERL/Math-GMP-2.04/blib/arch/auto/Math/GMP/GMP.so' for
module
Math::GMP: ld.so.1: /usr/local/bin/perl: fatal: relocation error:
file
/home/kstahl/PERL/Math-GMP-2.04/blib/arch/auto/Math/GMP/GMP.so:
symbol
__gmpz_init_set_str: referenced symbol not found at
/apps/gnu/perl-5.6.1/lib/sol2.sun4/DynaLoader.pm line 206.
at t/gmppm.t line 7
Compilation failed in require at t/gmppm.t line 7.
BEGIN failed--compilation aborted at t/gmppm.t line 7.
t/gmppm....dubious
Test returned status 255 (wstat 65280, 0xff00)
FAILED--1 test script could be run, alas--no output ever seen
make: *** [test_dynamic] Error 255
I checked in the directory shown above, and GMP.so is right there, as
expected. Any help with this will be greatly appreciated. Thanks!
------------------------------
Date: Fri, 05 Jan 2007 02:05:00 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Math::GMP make test fails.
Message-Id: <m2hcv6eyxv.fsf@Sherm-Pendleys-Computer.local>
"Ishmael" <stahl.karl@gmail.com> writes:
> I am trying to compile the Math::GMP module locally (not as root). I
> have successfully built gmp-4.2.1, but am having trouble getting the
> Perl wrapper to work. I am doing the following:
>
> perl Makefile.PL PREFIX=/home/kstahl/PERL/Math-GMP-2.04
>
> Here, I receive the following messages:
>
> Note (probably harmless): No library found for -lgmp
Not so harmless after all... :-/
> Writing Makefile for Math::GMP
>
> Now in order to point Make in the right direction to find my
> installation of gmp, I edited the Makefile, and added the correct path
> to CCFLAGS, i.e. the last entry below:
For changes like this, it's easier to edit Makefile.PL before running it -
in this case it's only 10 lines, as opposed to many lines of stuff you'd
need to wade through in the generated Makefile.
Also, editing Makefile.PL will make it easier to send your changes to the
module's maintainer. Not that the maintainer will want this particular
change of course... but next time you might find and fix a bug, who knows?
Anyway, you've only done half of what you need to do - along with telling
the compiler where to find the GMP headers, you also need to tell it where
to find the libgmp.so binary.
Does /home/kstahl/PERL/gmp-4.2.1 have include/ and lib/ subdirectories under
it? If so, add an INC param to the call to WriteMakefile(), and change the
LIBS param in Makefile.PL like this:
'INC' => '-I/home/kstahl/PERL/gmp-4.2.1/include',
'LIBS' => '-L/home/kstahl/PERL/gmp-4.2.1/lib -lgmp',
Adjust the paths as needed if there are no include/ and/or lib/ subdirs.
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: 4 Jan 2007 20:35:17 -0800
From: "Sai Kiran" <kanuri.sai-kiran@in.standardchartered.com>
Subject: Re: Net::SSH::Perl question
Message-Id: <1167971717.899111.85470@11g2000cwr.googlegroups.com>
On Jan 4, 10:53 pm, use...@DavidFilmer.com wrote:
> Sai Kiran wrote:
> > is that i am not able to find how to pass the password for the su
> > command after i login into the remote system.The only way I know of to do that is by the use of Expect:
> David Filmer (http://DavidFilmer.com)
Thanks David.
------------------------------
Date: Fri, 5 Jan 2007 05:42:16 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Fri Jan 5 2007
Message-Id: <JBDruG.tnq@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
Apache2-AutoIndex-XSLT-0.02
http://search.cpan.org/~nicolaw/Apache2-AutoIndex-XSLT-0.02/
XSLT Based Directory Listings
----
Archive-Extract-0.15_03
http://search.cpan.org/~kane/Archive-Extract-0.15_03/
A generic archive extracting mechanism
----
Audio-FLAC-Header-1.5
http://search.cpan.org/~daniel/Audio-FLAC-Header-1.5/
interface to FLAC header metadata.
----
Audio-FLAC-Header-1.6
http://search.cpan.org/~daniel/Audio-FLAC-Header-1.6/
interface to FLAC header metadata.
----
Audio-WMA-1.0
http://search.cpan.org/~daniel/Audio-WMA-1.0/
Perl extension for reading WMA/ASF Metadata
----
Bio-DOOP-DOOP-0.05
http://search.cpan.org/~tibi/Bio-DOOP-DOOP-0.05/
DOOP API main module
----
Carp-Assert-0.20
http://search.cpan.org/~mschwern/Carp-Assert-0.20/
executable comments
----
Crypt-OpenSSL-PKCS12-0.2
http://search.cpan.org/~daniel/Crypt-OpenSSL-PKCS12-0.2/
Perl extension to OpenSSL's PKCS12 API.
----
DBIx-Class-RandomStringColumns-0.04
http://search.cpan.org/~mikihoshi/DBIx-Class-RandomStringColumns-0.04/
Implicit random string columns
----
Data-Random-String-0.03
http://search.cpan.org/~makis/Data-Random-String-0.03/
Perl extension for creating random strings
----
Device-Conrad-RelaisControl-0.12
http://search.cpan.org/~noha/Device-Conrad-RelaisControl-0.12/
Perl extension for accessing a Conrad Electronic Relaiscard
----
Finance-Math-IRR-0.03
http://search.cpan.org/~erwan/Finance-Math-IRR-0.03/
Calculate the internal rate of return of a cash flow
----
Finance-Math-IRR-0.04
http://search.cpan.org/~erwan/Finance-Math-IRR-0.04/
Calculate the internal rate of return of a cash flow
----
GD-Graph-Polar-0.03
http://search.cpan.org/~mrdvt/GD-Graph-Polar-0.03/
Make polar graph using GD package
----
GD-Graph-Thermometer-0.02
http://search.cpan.org/~hesco/GD-Graph-Thermometer-0.02/
Generate progress graph on the fly
----
Geo-Ellipsoids-0.12
http://search.cpan.org/~mrdvt/Geo-Ellipsoids-0.12/
Package for standard Geo:: ellipsoid a, b, f and 1/f values.
----
Geo-Spline-0.15
http://search.cpan.org/~mrdvt/Geo-Spline-0.15/
Calculate geographic locations between GPS fixes.
----
HTML-SimpleLinkExtor-1.15
http://search.cpan.org/~bdfoy/HTML-SimpleLinkExtor-1.15/
Extract links from HTML
----
Image-Delivery-0.13
http://search.cpan.org/~adamk/Image-Delivery-0.13/
Efficient transformation and delivery of web images
----
List-Search-0.1
http://search.cpan.org/~evdb/List-Search-0.1/
fast searching of sorted lists
----
List-Search-0.2
http://search.cpan.org/~evdb/List-Search-0.2/
fast searching of sorted lists
----
MP3-Info-1.21
http://search.cpan.org/~daniel/MP3-Info-1.21/
Manipulate / fetch info from MP3 audio files
----
Math-Random-AcceptReject-0.01
http://search.cpan.org/~smueller/Math-Random-AcceptReject-0.01/
Acceptance-Rejection PDF transformations
----
Module-ScanDeps-0.71
http://search.cpan.org/~smueller/Module-ScanDeps-0.71/
Recursively scan Perl code for dependencies
----
Net-Frame-Layer-STP-1.01
http://search.cpan.org/~gomor/Net-Frame-Layer-STP-1.01/
Spanning Tree Protocol layer object
----
PDF-API2-0.56
http://search.cpan.org/~areibens/PDF-API2-0.56/
A Perl Module Chain to faciliate the Creation and Modification of High-Quality "Portable Document Format (aka. PDF)" Files.
----
SMS-AQL-0.02
http://search.cpan.org/~bigpresh/SMS-AQL-0.02/
Perl extension to send SMS text messages via AQ's SMS service
----
Sledge-Plugin-Captcha-0.01
http://search.cpan.org/~tokuhirom/Sledge-Plugin-Captcha-0.01/
create and validate Captcha for Sledge.
----
Test-WWW-Selenium-1.11
http://search.cpan.org/~lukec/Test-WWW-Selenium-1.11/
Test applications using Selenium Remote Control
----
Text-Template-Simple-0.47
http://search.cpan.org/~burak/Text-Template-Simple-0.47/
Simple text template engine
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 4 Jan 2007 23:58:43 -0800
From: "Paddy3118" <paddy3118@netscape.net>
Subject: Perl examples in many other languages
Message-Id: <1167983923.672899.67060@q40g2000cwq.googlegroups.com>
Hi,
I seem to have lost my reference to a web site with a series of around
100 simple Perl examples that have been implemented in other languages.
I think the Perl examples might have originally come from a book.
I do remember that there was a page that gave the percentage of the
original Perl examples that had been covered by other languages.
The other languages included both Ruby and Python as well as others.
I have googled, but without success.
Thanks, Paddy.
------------------------------
Date: Thu, 04 Jan 2007 18:08:26 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: uninitialized value warnings and run time
Message-Id: <x7d55ue6fp.fsf@mail.sysarch.com>
>>>>> "j" == julia <juliabell@worldnet.att.net> writes:
j> It also provides some encouragement for moving blocks of code into
j> subroutines instead of keeping them inline (although I do sometimes
j> wonder if the overhead associated with a subroutine outweighs the
j> benefit compared with a block of inline code that is only ever called
j> from one location).
my rule is to minimize inline code (except for very short scripts). subs
are a major way to ORGANIZE your code and logic flow. when i see long
linear scripts i want to pull out my hair (what little of it seems
left). i have a perloncall.com client (a regular here :) who recently
gave me such a script to for code review. we are slowly refactoring it
into almost all subs so you can hide less important code (stuff like get
a dbi connection, get cgi params, etc.) and see the real flow. subs have
two major purposes but usually only one, code reuse, is taught. code
organization is just as important and if you are concerned about the sub
call overhead you are prematurely microoptimizing.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Thu, 04 Jan 2007 18:11:19 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: uninitialized value warnings and run time
Message-Id: <x78xgie6aw.fsf@mail.sysarch.com>
>>>>> "JG" == J Gleixner <glex_no-spam@qwest-spam-no.invalid> writes:
JG> While subroutines are a good coding practice, moving code that's only
JG> called once into a subroutine won't improve the run-time. Figure
JG> out why it's slower than expected and code/optimize as needed.
but it can help you isolate the slower code. it is easier to do a
profile on subs than with a long linear script. rarely would just a line
or two of code be the bottleneck. it is usually a poor data structure or
poor coding, both of which are easier to analyze if the code is broken
up into logical and reasonably sized subs. see my other post for why i
say you should have minimal main line code.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Thu, 4 Jan 2007 21:20:30 -0500
From: "Thrill5" <nospam@somewhere.com>
Subject: Re: uninitialized value warnings and run time
Message-Id: <e8udnUUXuvhvKADYnZ2dnUVZ_sWdnZ2d@comcast.com>
"julia" <juliabell@worldnet.att.net> wrote in message
news:1167939953.298526.157390@v33g2000cwv.googlegroups.com...
> I'm reviewing a script to try to identify why it takes so ong to
> execute.
>
> It generates a lot (thousands) of uninitialized value warnings.
>
> Does not properly initializing variables increase the run-time?
>
After you have checked every instance of the warning and you know that the
"unitialized" value is not a problem, you can turn this particular warning
off in your script. You really do need to check each instance of the
warning because you will find instances where this warning is indeed a
potential problem.
use warnings;
no warnings 'uninitialized';
Scott
------------------------------
Date: Thu, 04 Jan 2007 22:47:40 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: uninitialized value warnings and run time
Message-Id: <x7vejmcexv.fsf@mail.sysarch.com>
>>>>> "T" == Thrill5 <nospam@somewhere.com> writes:
T> "julia" <juliabell@worldnet.att.net> wrote in message
T> news:1167939953.298526.157390@v33g2000cwv.googlegroups.com...
>> I'm reviewing a script to try to identify why it takes so ong to
>> execute.
>>
>> It generates a lot (thousands) of uninitialized value warnings.
>>
>> Does not properly initializing variables increase the run-time?
>>
T> After you have checked every instance of the warning and you know that the
T> "unitialized" value is not a problem, you can turn this particular warning
T> off in your script. You really do need to check each instance of the
T> warning because you will find instances where this warning is indeed a
T> potential problem.
T> use warnings;
T> no warnings 'uninitialized';
that is a very bad thing to do. i won't get into it as many past threads
have covered it. worrying about initialization time when you can't even
figure out how to stop uninitialized warnings is such a premature
optimization symptom.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 4 Jan 2007 20:38:37 -0800
From: perlerogdl@hotmail.com
Subject: Re: Unsecured scripts and site hacking?
Message-Id: <1167971917.029633.146370@q40g2000cwq.googlegroups.com>
Henry Law wrote:
> Lawrence Statton XE2/N1GAK wrote:
>
> > You are clearly clue retardant. *plonk*
>
> Remind me never to try to help this very unpleasant person.
>
> --
>
> Henry Law Manchester, England
I do not know you are, but I know yankee about six months - he
translated two books of learning perl to spanish, is a part time master
at the university and has several students work in his company.
Is a cool guy who helps everyone here and is very pleasant person.
------------------------------
Date: Thu, 04 Jan 2007 22:01:40 -0500
From: Andras Malatinszky <nobody@dev.null>
Subject: Re: which email module - MIME::LITE, Email::Send, other?
Message-Id: <icjnh.22183$Dy2.1053@newsfe20.lga>
brewsterbear@googlemail.com wrote:
> Hi,
>
> Just wondering which is the "preferred" way to send email, possibly
> with attachments. I noticed MIME::Lite hasn't been developed for a few
> years, not that it really needs development. Are people using
> Email::Send or Mail::Send? Any recommendation appreciated.
>
> Thanks
>
I've used MIME::Lite successfully to send email with attachments, but
most often I us NET::SMTP. It's really a matter of personal preference.
------------------------------
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 10119
****************************************