[30960] in Perl-Users-Digest
Perl-Users Digest, Issue: 2205 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 12 06:09:42 2009
Date: Thu, 12 Feb 2009 03:09:07 -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, 12 Feb 2009 Volume: 11 Number: 2205
Today's topics:
Re: * Obama's wife Naked <rod.speed.aaa@gmail.com>
Re: Adding path to @INC <guru.naveen@gmail.com>
Re: Adding path to @INC <guru.naveen@gmail.com>
Re: Adding path to @INC <peter@makholm.net>
Re: Adding path to @INC <noreply@gunnar.cc>
Re: Can I write CPAN Modules for a living? <nomail@not.net>
Copy with relative paths? / Glob w/UNC? <antgoodlife@gmail.com>
Re: error printing page using LWP::Simple <larry@example.invalid>
Re: error printing page using LWP::Simple <larry@example.invalid>
Getting the name of a variable reference <nomail@not.net>
Re: Getting the name of a variable reference <1usa@llenroc.ude.invalid>
Re: Getting the name of a variable reference <smallpond@juno.com>
Re: Getting the name of a variable reference <tadmc@seesig.invalid>
new CPAN modules on Thu Feb 12 2009 (Randal Schwartz)
Problem using Net::SSH::Perl <schaitan@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 12 Feb 2009 14:57:49 +1100
From: "Rod Speed" <rod.speed.aaa@gmail.com>
Subject: Re: * Obama's wife Naked
Message-Id: <6vhl20Fk0g3vU1@mid.individual.net>
albundy2@mailinator.com wrote:
> On Feb 11, 4:54 pm, nick <nickmacpherso...@AOL.com> wrote:
>> On Feb 11, 4:48 pm, albun...@mailinator.com wrote:
>>
>>> On Feb 11, 3:17 pm, thenth...@gmail.com wrote:
>>
>>>> Photos of Obamas wife naked! We
>>>> will keep this our little secret amazing! archive of private movies
>>>> and all kinds of sexual positions. You must see her with her batman
>>>> utility belt its quite the movie. A must watch. Voted for change
>>>> and thats all I got :(.)
>>
>>> My vision is bad enough already. I can't take the chance of
>>> blindness.
>>
>> Isn't it time you guys worked some new material? You've been working
>> this schtick since Amy Carter.
>
> · Pretty women make us BUY bear. Ugly women make us DRINK beer.
How long have you been BUYING bear ?
------------------------------
Date: Wed, 11 Feb 2009 19:58:54 -0800 (PST)
From: guru <guru.naveen@gmail.com>
Subject: Re: Adding path to @INC
Message-Id: <a16b940f-23a3-43e1-9545-50d6365da18e@r36g2000prf.googlegroups.com>
On Feb 11, 7:38=A0pm, Peter Makholm <pe...@makholm.net> wrote:
> guru <guru.nav...@gmail.com> writes:
> > $LINK_PATH =3D "/usr/raja/"
>
> This line is outside the BEGIN block and is such executed at normal
> run time.
>
> > BEGIN {
> > =A0 =A0 =A0 =A0 push @INC,"$LINK_PATH";
>
> This line is inside the BEGIN block ans is as such executed at compile
> time. At this time $LINK_PATH doesn't have any content. Put both lines
> inside the BEGIN block or just do away with $LINK_PATH.
>
> > =A0 =A0 =A0 =A0 }
>
> //Makholm
The actuall code is
I am setting softlink to the path where the modules exist. I have to
read that softlink and set that path in INC.
my $LINK_PATH =3D readlink("$CURR_PATH/source");
BEGIN {
}
------------------------------
Date: Wed, 11 Feb 2009 20:01:20 -0800 (PST)
From: guru <guru.naveen@gmail.com>
Subject: Re: Adding path to @INC
Message-Id: <53f44f21-dd3f-4da4-b937-4c1449d5a9ec@r15g2000prd.googlegroups.com>
On Feb 12, 8:58=A0am, guru <guru.nav...@gmail.com> wrote:
> On Feb 11, 7:38=A0pm, Peter Makholm <pe...@makholm.net> wrote:
>
>
>
>
>
> > guru <guru.nav...@gmail.com> writes:
> > > $LINK_PATH =3D "/usr/raja/"
>
> > This line is outside the BEGIN block and is such executed at normal
> > run time.
>
> > > BEGIN {
> > > =A0 =A0 =A0 =A0 push @INC,"$LINK_PATH";
>
> > This line is inside the BEGIN block ans is as such executed at compile
> > time. At this time $LINK_PATH doesn't have any content. Put both lines
> > inside the BEGIN block or just do away with $LINK_PATH.
>
> > > =A0 =A0 =A0 =A0 }
>
> > //Makholm
>
The actuall code is
I am setting softlink to the path where the modules exist. I have to
read that softlink and set that path in INC.
my $LINK_PATH =3D readlink("$CURR_PATH/source");
BEGIN {
push @INC,"$LINK_PATH";
=A0 =A0 =A0 }
source is softlink. path is read from this and trying to push to INC.
Where I am going wrong.
Thanks & Regards
Gururaja
------------------------------
Date: Thu, 12 Feb 2009 08:13:35 +0100
From: Peter Makholm <peter@makholm.net>
Subject: Re: Adding path to @INC
Message-Id: <87ocx8b00w.fsf@vps1.hacking.dk>
guru <guru.naveen@gmail.com> writes:
> my $LINK_PATH = readlink("$CURR_PATH/source");
>
> BEGIN {
> push @INC,"$LINK_PATH";
> }
>
> source is softlink. path is read from this and trying to push to INC.
> Where I am going wrong.
Everything you need to execute to set @INC should be put inside the
BEGIN block. So if you need to call readlink before setting @INC, then
do it in the BEGIN block and not just before the BEGIN-block.
//Makholm
------------------------------
Date: Thu, 12 Feb 2009 09:56:43 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Adding path to @INC
Message-Id: <6vi6ejFk1ic5U1@mid.individual.net>
Peter Makholm wrote:
> guru <guru.naveen@gmail.com> writes:
>
>> my $LINK_PATH = readlink("$CURR_PATH/source");
>>
>> BEGIN {
>> push @INC,"$LINK_PATH";
>> }
>>
>> source is softlink. path is read from this and trying to push to INC.
>> Where I am going wrong.
>
> Everything you need to execute to set @INC should be put inside the
> BEGIN block. So if you need to call readlink before setting @INC, then
> do it in the BEGIN block and not just before the BEGIN-block.
Optionally: Skip the BEGIN block. readlink() may not be known at compile
time either, and it's a chance that files in $LINK_PATH are just
require()d, not use()d.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Wed, 11 Feb 2009 22:35:54 -0500
From: Dave Stallard <nomail@not.net>
Subject: Re: Can I write CPAN Modules for a living?
Message-Id: <pdydnXfeHvKBBA7UnZ2dnUVZ_rDinZ2d@giganews.com>
Tad J McClellan wrote:
> Or the pornography sector, as it seems to have some experience there:
>
> http://groups.google.com/group/comp.lang.perl.misc/browse_thread/thread/cc3960ba4aca674?q=#68e6b4a91d6f1f43
At least he comments his code and indents consistently. ;) But I don't
like all that sprawling control structure. He needs to break it up into
more functions. Sorry, he's not hired.
Dave
------------------------------
Date: Wed, 11 Feb 2009 19:30:47 -0800 (PST)
From: Antgoodlife <antgoodlife@gmail.com>
Subject: Copy with relative paths? / Glob w/UNC?
Message-Id: <0e4ff23b-62e1-4f0e-8b08-1216bcee809a@s20g2000yqh.googlegroups.com>
Hi All...
I'd like to have the target of this copy be a folder underneath
where the perl script is executed from without using the full D:\
Absolute path.... : (That way the script is a little more portable)..
(this is running on Windows PERL 5.10.)
D:\Script>mkdir CopyOfData
D:\Script>type myrename_and_copy.pl
#perl -w
use strict;
use File::Path;
use File::Copy;
chdir "\\\\myserver\\myshare";
for my $file (<*>) {
$file =~ m/^(.*)_.*$/;
copy($file, "d:\\Script\\CopyOfData\\$1") or die "File cannot be
copied.";
}
#-------------- Done
d:\Script>perl myrename_and_copy.pl
This works fine as above.. but to me it's a poor "workaround" because
from what I can tell I can't put the UNC path in either the copy
source or the glob angle brackets.. I need to use CHDIR first. (And
because I changed directories now I need to use the absolute path to
the target instead of just my "CopyOfData" folder.
I'm pretty sure I can get it to work if I use CWD and save the
current directory before I change to the server source share (Just as
ugly I believe) However, I want to ask the group before I go this
route if there's a better way.
Thanks in advance. Let me know if I didn't include enough info also,
Thanks a lot.
------------------------------
Date: Wed, 11 Feb 2009 21:26:21 -0700
From: Larry Gates <larry@example.invalid>
Subject: Re: error printing page using LWP::Simple
Message-Id: <1nqiv6rny5ck2$.1nfxnu5tjq6zy.dlg@40tude.net>
On Wed, 11 Feb 2009 07:01:30 -0600, Tad J McClellan wrote:
> Larry Gates <larry@example.invalid> wrote:
>> On Fri, 06 Feb 2009 13:23:21 -0800, Tim Greer wrote:
>>
>>> You can grab the Julian date with something like:
>>>
>>> my $juldate = ($t =~ m/name="jd" value="([^"]+)"/) ? $1 : "No date";
>>>
>>> Of course, there are dozens of ways of doing this.
>>
>> Is that the conditional operator from c there? :
> ^^^^^^^^^^^^^^^^^^^^
>
>
> I wonder if maybe there is a heading of "Conditional Operator" in
>
> perldoc perlop
>
> :-)
Conditional Operator
Ternary "?:" is the conditional operator, just as in C. It works much
like an if-then-else. If the argument before the ? is true, the
argument
before the : is returned, otherwise the argument after the : is
returned. For example:
printf "I have %d dog%s.\n", $n,
($n == 1) ? '' : "s";
Scalar or list context propagates downward into the 2nd or 3rd
argument,
whichever is selected.
$a = $ok ? $b : $c; # get a scalar
@a = $ok ? @b : @c; # get an array
$a = $ok ? @b : @c; # oops, that's just a count!
The operator may be assigned to if both the 2nd and 3rd arguments are
legal lvalues (meaning that you can assign to them):
($a_or_b ? $a : $b) = $c;
Because this operator produces an assignable result, using assignments
without parentheses will get you in trouble. For example, this:
$a % 2 ? $a += 10 : $a += 2
Really means this:
(($a % 2) ? ($a += 10) : $a) += 2
Rather than this:
($a % 2) ? ($a += 10) : ($a += 2)
That should probably be written more simply as:
$a += ($a % 2) ? 10 : 2;
Tad--
I've got something else tonight. I fielded the following post in c.l.f.
so:
On Wed, 11 Feb 2009 13:41:53 -0800 (PST), tripp wrote:
> Hello Folks,
>
> I am using Lahey FORTRAN to process several large image datasets.
> Currently, I dump the resulting data to a text file which is
> subsequently processed separately using a Perl script.
>
> I am wondering if it is possible to feed the FORTRAN array directly
> (from memory) to Perl or PYTHON. Can this be done? Any ideas or
> suggestions?
>
> Thanks,
> TLowe.
What's your data set look like? By image do you mean the right side of a
function or something like a .bmp?
Perl is very good at simulating the activities of a Bourne shell, so if you
can describe how you'd do it on the commandline, then you're past first
base.
For me, perl is my weaker syntax, so I would do the harder stuff in fortran
first, if only to get my head around how I would work it up in perl. Once
you've got an objective and something to show as a script--it could be
minimal like inputting and outputting from a file to stdout--then you will
likely be well-treated if you post in comp.lang.perl.misc.
You'll need some time to read, once you do this, as they expect newcomers
to read anything relevant they post. In preparation, you could grab
_Programming Perl_ from the library. I call it the camel book.
I'd love to follow this, so I hope you're not a poster who rings the
doorbell only to leave a pile of flaming dogshit on the porch. I wouldn't
mind working it up in python as well. My uncle replaced the C curriculum
with python in the comp sci dept he directs. He doesn't miss C a bit.
#end excerpt
Do you have a faq for this?
--
larry gates
fail("Language designer not persuaded"); # :-)
-- Larry Wall in <20050327054109.GC25664@wall.org>
--
larry gates
Python's syntax succeeds in combining the mistakes of Lisp and Fortran.
I do not contrue that as progress.
-- Larry Wall in <20040512161005.GB3902@wall.org>
------------------------------
Date: Wed, 11 Feb 2009 21:45:16 -0700
From: Larry Gates <larry@example.invalid>
Subject: Re: error printing page using LWP::Simple
Message-Id: <17ng0kbk49ovj$.1wakdubdabofr$.dlg@40tude.net>
On Tue, 10 Feb 2009 23:21:05 -0700, Larry Gates wrote:
> On Fri, 6 Feb 2009 15:40:49 -0600, Tad J McClellan wrote:
>
>> Larry Gates <larry@example.invalid> wrote:
>>
>>
>>><input type="text" name="jd" value="2454869.37545" size="20"
>>>
>>> How do I grab the julian date from this?
>>
>>
>> You use a module that understands HTML for processing HTML data.
>>
>>
>> ---------------------------
>> #!/usr/bin/perl
>> use warnings;
>> use strict;
>> use HTML::TreeBuilder;
>> use LWP::Simple;
>>
>> my $site_url = 'http://www.fourmilab.ch/cgi-bin/Yoursky';
>> my $url_args = 'z=1&lat=35.0836&ns=North&lon=106.651&ew=West';
>> my $t = get "$site_url?$url_args" || "Problem";
>>
>> my $tree = HTML::TreeBuilder->new_from_content($t);
>>
>> foreach my $elem ( $tree->find_by_attribute('name', 'jd') ) {
>> print $elem->attr('value'), "\n";
>> }
>> ---------------------------
>
> I've had problems getting modules to where they need to be with
> activestate. I tried with DateTime and Time::Julian.
>
> I'll go for TreeBuilder when I need don't need to leave imeediately.
http://tinypic.com/view.php?pic=i6fr42&s=5
Rats.
--
larry gates
It's, uh, pseudo code. Yeah, that's the ticket...
[...]
And "unicode" is pseudo code for $encoding. :-)
-- Larry Wall in <199808071717.KAA12628@wall.org>
------------------------------
Date: Wed, 11 Feb 2009 22:29:20 -0500
From: Dave Stallard <nomail@not.net>
Subject: Getting the name of a variable reference
Message-Id: <ZfadnfNcjMkMCg7UnZ2dnUVZ_vSdnZ2d@giganews.com>
So I have this handy function that is called like this
setVar(\$someVar,$someValue);
I use it to check and enforce consistency when multiple functions might
want to set $someVar. It's defined something like this:
sub setVar {
my ($var,$value) = @_;
my $cur = $$var;
$$var = $value unless defined($cur);
die "Mismatched value for $var: $cur vs. $value" unless $cur == $value;
}
The problem is I get this expression "<SCALAR-REF>#111" or whatever,
instead of the variable name I want to appear in the die message. How
do I get at the name?
Dave
PS Sorry for multiple post with c.l.p; I forgot to cross-post.
------------------------------
Date: Thu, 12 Feb 2009 04:17:20 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Getting the name of a variable reference
Message-Id: <Xns9BAFECE184ED5asu1cornelledu@127.0.0.1>
Dave Stallard <nomail@not.net> wrote in
news:ZfadnfNcjMkMCg7UnZ2dnUVZ_vSdnZ2d@giganews.com:
> So I have this handy function that is called like this
>
> setVar(\$someVar,$someValue);
>
> I use it to check and enforce consistency when multiple functions
> might want to set $someVar. It's defined something like this:
>
> sub setVar {
> my ($var,$value) = @_;
> my $cur = $$var;
> $$var = $value unless defined($cur);
> die "Mismatched value for $var: $cur vs. $value" unless $cur ==
> $value;
> }
>
> The problem is I get this expression "<SCALAR-REF>#111" or whatever,
> instead of the variable name I want to appear in the die message. How
> do I get at the name?
You don't. You use this opportunity to redesign your program so as not
to use the monstrosity above.
> PS Sorry for multiple post with c.l.p; I forgot to cross-post.
c.l.p. is defunct.
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: Wed, 11 Feb 2009 21:04:18 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: Getting the name of a variable reference
Message-Id: <10968cb3-7948-4939-a97b-4402cd7727f9@j35g2000yqh.googlegroups.com>
On Feb 11, 10:29 pm, Dave Stallard <nom...@not.net> wrote:
> So I have this handy function that is called like this
>
> setVar(\$someVar,$someValue);
>
> I use it to check and enforce consistency when multiple functions might
> want to set $someVar. It's defined something like this:
>
> sub setVar {
> my ($var,$value) = @_;
> my $cur = $$var;
> $$var = $value unless defined($cur);
> die "Mismatched value for $var: $cur vs. $value" unless $cur == $value;
>
> }
>
> The problem is I get this expression "<SCALAR-REF>#111" or whatever,
> instead of the variable name I want to appear in the die message. How
> do I get at the name?
>
> Dave
In almost every case where you think you want to access a
variable's name you are better off using a hash and key.
my $cur = $hash{$name};
if (defined $cur) {
die "Mismatched value for $name: $cur vs. $value"
unless $cur == $value;
} else {
$hash{$name} = $value;
}
------------------------------
Date: Thu, 12 Feb 2009 01:14:55 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Getting the name of a variable reference
Message-Id: <slrngp7j3f.rk.tadmc@tadmc30.sbcglobal.net>
Dave Stallard <nomail@not.net> wrote:
> PS Sorry for multiple post with c.l.p
The comp.lang.perl newsgroup was rmgroup'd over a decade ago...
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Thu, 12 Feb 2009 05:42:25 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu Feb 12 2009
Message-Id: <KExuIp.Hs6@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.
Algorithm-Dependency-1.108
http://search.cpan.org/~adamk/Algorithm-Dependency-1.108/
Base class for implementing various dependency trees
----
App-Textcast-0.04.8
http://search.cpan.org/~nkh/App-Textcast-0.04.8/
Light weight text casting
----
BioPerl-db-1.5.9_2
http://search.cpan.org/~cjfields/BioPerl-db-1.5.9_2/
----
BioPerl-network-1.5.9_2
http://search.cpan.org/~cjfields/BioPerl-network-1.5.9_2/
----
BioPerl-run-1.5.9_2
http://search.cpan.org/~cjfields/BioPerl-run-1.5.9_2/
----
Catalyst-Plugin-Session-Store-Delegate-0.03
http://search.cpan.org/~bobtfish/Catalyst-Plugin-Session-Store-Delegate-0.03/
Delegate session storage to an application model object.
----
Catalyst-View-Component-SubInclude-0.04
http://search.cpan.org/~nilsonsfj/Catalyst-View-Component-SubInclude-0.04/
Use subincludes in your Catalyst views
----
DBIx-Class-0.08011
http://search.cpan.org/~ribasushi/DBIx-Class-0.08011/
Extensible and flexible object <-> relational mapper.
----
DBIx-Class-AsObject-0.09_01
http://search.cpan.org/~perler/DBIx-Class-AsObject-0.09_01/
----
DBIx-Migration-Directories-0.09
http://search.cpan.org/~crakrjack/DBIx-Migration-Directories-0.09/
Install/remove/upgrade/downgrade SQL schemas
----
Data-DPath-0.06
http://search.cpan.org/~schwigon/Data-DPath-0.06/
DPath is not XPath!
----
Data-DPath-0.07
http://search.cpan.org/~schwigon/Data-DPath-0.07/
DPath is not XPath!
----
Data-DPath-0.08
http://search.cpan.org/~schwigon/Data-DPath-0.08/
DPath is not XPath!
----
Devel-MRO-0.04
http://search.cpan.org/~gfuji/Devel-MRO-0.04/
Provides mro functions for XS modules
----
File-Find-Rule-Permissions-2.0
http://search.cpan.org/~dcantrell/File-Find-Rule-Permissions-2.0/
rule to match on file permissions and user access
----
HTML-Packer-0.3
http://search.cpan.org/~nevesenin/HTML-Packer-0.3/
AAnother HTML code cleaner
----
Hash-Union-0.03
http://search.cpan.org/~lonerr/Hash-Union-0.03/
smart hashes merging
----
Integer-Tiny
http://search.cpan.org/~bbkr/Integer-Tiny/
Shorten and obfuscate your Integer values. Just like IDs on YouTube!
----
Integer-Tiny-0.1
http://search.cpan.org/~bbkr/Integer-Tiny-0.1/
Shorten and obfuscate your Integer values. Just like IDs on YouTube!
----
Lingua-EN-Titlecase-0.12
http://search.cpan.org/~ashley/Lingua-EN-Titlecase-0.12/
Titlecase English words by traditional editorial rules.
----
MP3-CreateInlayCard-0.05
http://search.cpan.org/~bigpresh/MP3-CreateInlayCard-0.05/
create a CD inlay label for a directory of MP3 files
----
Math-Pari-2.010801
http://search.cpan.org/~ilyaz/Math-Pari-2.010801/
Perl interface to PARI.
----
Net-OpenSSH-0.28
http://search.cpan.org/~salva/Net-OpenSSH-0.28/
Perl SSH client package implemented on top of OpenSSH
----
POE-Component-Algorithm-Evolutionary-0.0.5
http://search.cpan.org/~jmerelo/POE-Component-Algorithm-Evolutionary-0.0.5/
Run evolutionary algorithms in a preemptive multitasking way.
----
Parallel-SubArray-0.6
http://search.cpan.org/~sizur/Parallel-SubArray-0.6/
Execute forked subref array and join return values, timeouts and error captures.
----
Rose-DBx-Object-Renderer-0.42
http://search.cpan.org/~danny/Rose-DBx-Object-Renderer-0.42/
Web UI Rendering for Rose::DB::Object
----
SQL-Abstract-1.49_01
http://search.cpan.org/~mstrout/SQL-Abstract-1.49_01/
Generate SQL from Perl data structures
----
Simo-0.07_03
http://search.cpan.org/~kimoto/Simo-0.07_03/
Very simple framework for Object Oriented Perl.
----
Simo-Constrain-0.01_01
http://search.cpan.org/~kimoto/Simo-Constrain-0.01_01/
Constrain methods for Simo;
----
Simo-Constrain-0.01_02
http://search.cpan.org/~kimoto/Simo-Constrain-0.01_02/
Constrain functions for Simo;
----
Simo-Constrain-0.01_03
http://search.cpan.org/~kimoto/Simo-Constrain-0.01_03/
Constrain functions for Simo;
----
Task-Padre-Plugins-0.12
http://search.cpan.org/~fayland/Task-Padre-Plugins-0.12/
Get many Plugins of Padre at once
----
Test-Grian-Data-Dumper-0.02
http://search.cpan.org/~grian/Test-Grian-Data-Dumper-0.02/
Perl extension for blah blah blah
----
Tie-TZ-5
http://search.cpan.org/~kryde/Tie-TZ-5/
tied $TZ setting %ENV and calling tzset()
----
XML-Compile-Tester-0.05
http://search.cpan.org/~markov/XML-Compile-Tester-0.05/
support XML::Compile related regression testing
----
XML-Table2XML-1.1
http://search.cpan.org/~rkapl/XML-Table2XML-1.1/
Generic conversion of tabular data to XML by reverting Excel's flattener methodology.
----
Xacobeo-0.06
http://search.cpan.org/~potyl/Xacobeo-0.06/
XPath (XML Path Language) visualizer.
----
mobirc-1.99_02
http://search.cpan.org/~tokuhirom/mobirc-1.99_02/
modern IRC to HTTP gateway
----
mpp-1.50-090212
http://search.cpan.org/~pfeiffer/mpp-1.50-090212/
----
xcruciate-008b
http://search.cpan.org/~melonman/xcruciate-008b/
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/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Thu, 12 Feb 2009 01:01:27 -0800 (PST)
From: Krishna Chaitanya <schaitan@gmail.com>
Subject: Problem using Net::SSH::Perl
Message-Id: <41661105-c365-4975-9ecc-0ea2afbeafb0@i18g2000prf.googlegroups.com>
Hi all,
Am trying to run a program called "1.pl" on a linux box with IP
10.0.75.201. Contents of "1.pl":
------------------------
#!/usr/bin/perl -w
use Net::SSH::Perl;
my $ssh = Net::SSH::Perl->new("10.0.75.201", debug => 1, protocol =>
'2,1', identity_files => ['/root/.ssh/id_rsa']);
$ssh->login("root","<root passwd goes here>");
my ($stdout,$stderr,$exit_status) = $ssh->cmd("ls -l");
print "Stdout is $stdout\n\nStderr is $stderr\n\nExit Status is
$exit_status\n\n";
------------------------
So...the attempt is to connect to this own IP....I generated rsa
keypair using ssh-keygen -t rsa with empty paraphrase and mentioned
path of id_rsa to identity_files as you can see above in the
constructor.
Am running as root user and want to connect as root user. Following is
the debug output:
-------------------------------------------------------
SSLES10-SP2-32:~/packages # perl 1.pl
SSLES10-SP2-32: Reading configuration data /root/.ssh/config
SSLES10-SP2-32: Reading configuration data /etc/ssh_config
SSLES10-SP2-32: Allocated local port 1023.
SSLES10-SP2-32: Connecting to 10.0.75.201, port 22.
SSLES10-SP2-32: Remote protocol version 1.99, remote software version
OpenSSH_4.2
SSLES10-SP2-32: Net::SSH::Perl Version 1.34, protocol version 2.0.
SSLES10-SP2-32: No compat match: OpenSSH_4.2.
SSLES10-SP2-32: Connection established.
SSLES10-SP2-32: Sent key-exchange init (KEXINIT), wait response.
SSLES10-SP2-32: Algorithms, c->s: 3des-cbc hmac-sha1 none
SSLES10-SP2-32: Algorithms, s->c: 3des-cbc hmac-sha1 none
SSLES10-SP2-32: Entering Diffie-Hellman Group 1 key exchange.
SSLES10-SP2-32: Sent DH public key, waiting for reply.
SSLES10-SP2-32: Received host key, type 'ssh-dss'.
SSLES10-SP2-32: Host '10.0.75.201' is known and matches the host key.
SSLES10-SP2-32: Computing shared secret key.
SSLES10-SP2-32: Verifying server signature.
SSLES10-SP2-32: Waiting for NEWKEYS message.
SSLES10-SP2-32: Send NEWKEYS.
SSLES10-SP2-32: Enabling encryption/MAC/compression.
SSLES10-SP2-32: Sending request for user-authentication service.
SSLES10-SP2-32: Service accepted: ssh-userauth.
SSLES10-SP2-32: Trying empty user-authentication request.
SSLES10-SP2-32: Authentication methods that can continue:
publickey,keyboard-interactive.
SSLES10-SP2-32: Next method to try is publickey.
SSLES10-SP2-32: Trying pubkey authentication with key file '/root/.ssh/
id_rsa'
SSLES10-SP2-32: Authentication methods that can continue:
publickey,keyboard-interactive.
SSLES10-SP2-32: Next method to try is publickey.
SSLES10-SP2-32: Trying pubkey authentication with key file '/root/.ssh/
id_rsa'
SSLES10-SP2-32: Authentication methods that can continue:
publickey,keyboard-interactive.
SSLES10-SP2-32: Next method to try is publickey.
Permission denied at 1.pl line 6
---------------------------------------------------------
Why is this happening? I've no clue, frankly. The configuration files
it tried reading - /root/.ssh/config and /etc/ssh_config both don't
exist. Instead, there's a configuration file /etc/ssh/ssh_config.
Can anyone help me please? I've installed all the Crypt:: modules
required for Net::SSH::Perl to succeed.
Regards,
Chaitanya
------------------------------
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 2205
***************************************