Re: perl net::ssh module

2010-10-14 Thread Alexey Mishustin

10/13/2010, han sun sunhan...@gmail.com you wrote:

Math::BigInt::couldn't load specified math lib(s), fallback to
Math::BigInt::FastCalc at C:/Program Files/Perl/Site/site/lib/Crypt/DH.pm
line 6

I have google the problem,but still haven't worked it out.
It's too late, I have to go to sleep.
If somebody know the solution, please let me know, thanks very much.

Did you check this?

http://www.perlmonks.org/?node_id=664894

--
Regards,
Alex

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: How to parse email header

2010-10-14 Thread S Pratap Singh
I got the problem fixed by using Mail::Header perl module and it is better
than before. Thanks for all your inputs , really appreciated.

Rregards,
Pratap


Re: perl net::ssh module

2010-10-14 Thread Irfan Sayed
thanks now it is working fine 

--irfan



From: Alexey Mishustin shum...@shumkar.ru
To: beginners@perl.org
Sent: Thu, October 14, 2010 11:08:24 AM
Subject: Re: perl net::ssh module


10/13/2010, han sun sunhan...@gmail.com you wrote:

2010/10/12 Irfan Sayed irfan_sayed2...@yahoo.com

 now getting following error:

 Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Cannot find current
 script
 './igor_tar.pl' at /home/y/lib/perl5/5.8/FindBin.pm line 188
 BEGIN failed--compilation aborted at /home/y/lib/perl5/5.8/FindBin.pm line
 188.

 here is the latest code:

 my $host = gwbl7001.blue.ygrid.yahoo.com;
  my $user = irfanjs;
  my $cmd = ls;
  my $msg;
  my %params;
  $params{'identity_files'} = '/home/irfanjs/.ssh/identity';
  $params{'protocol'} = '2,1';
  foreach (sort keys %params) {
print $_ : $params{$_}\n;
  }
  my $ssh = Net::SSH::Perl-new($host,%params);
  $ssh-login($user);
  $ssh-cmd($cmd);


 any issue with protocol?
 --irfan

I never used yet this Perl module but I guess you should follow the
syntax used in its examples
( http://search.cpan.org/~turnstep/Net-SSH-Perl-1.34/lib/Net/SSH/Perl.pm )

my $ssh = Net::SSH::Perl-new(host, options = [
BatchMode yes, RhostsAuthentication no ]);

that is

my $ssh = Net::SSH::Perl-new(gwbl7001.blue.ygrid.yahoo.com,
identity_files = '/home/irfanjs/.ssh/identity', protocol = '2,1');

--
Regards,
Alex

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


  

Re: Perl Threads

2010-10-14 Thread a b
Thanks a lot All of your

On Wed, Oct 13, 2010 at 6:21 AM, Brian Fraser frase...@gmail.com wrote:

 The usual elevator example:
 http://www.perl.com/pub/2002/09/04/threads.html

 I'm not entirely sure if the article is dated (I used it a couple of months
 back as a personal introduction to threads in general, for whatever that
 counts), but if anything, the explanation on building a threaded Perl, and
 the part about shared variables, are both still useful.


 Brian.



new line using print

2010-10-14 Thread Amish Rughoonundon
Hi,
 I would like to print a file under windows using perl but with the
end of line character be only 0x0A and not 0x0D followed by 0x0A. Is
there a way to set $\ to 0x0A so that every time I use print, it only
prints 0x0A and NOT 0x0D followed by 0x0A. Any other method would also
be welcomed. Thanks for the help,
Amish


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: new line using print

2010-10-14 Thread Shawn H Corey

On 10-10-13 04:16 PM, Amish Rughoonundon wrote:

Hi,
  I would like to print a file under windows using perl but with the
end of line character be only 0x0A and not 0x0D followed by 0x0A. Is
there a way to set $\ to 0x0A so that every time I use print, it only
prints 0x0A and NOT 0x0D followed by 0x0A. Any other method would also
be welcomed. Thanks for the help,
Amish




On Windows, Perl automatically change CR-LF on input to LF and LF to 
CR-LF on output.  To force it, change its layer to ':crlf'


open my $fh, ':crlf', $file or die $!;

Others layers are:
:raw  which does not convert anything
:encoding(utf8)  which converts to/from UTF-8 encoding


See:
perldoc opentut
perdloc -f binmode
perldoc -f open


--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early  often.

Eliminate software piracy:  use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/