Re: connecting to multiple hosts using Net::SSH2

2009-03-10 Thread rkb
Jerald Sheets wrote: On Mar 8, 2009, at 1:29 PM, Ron Bergin wrote: On Mar 4, 4:46 am, que...@gmail.com (Jerald Sheets) wrote: I really think you're doing yourself a disservice by just throwing your program commands on lines, not indenting according to best practices. It makes your code

Re: Can docx2txt Be Installed In Windows Strawberry Perl as a Module

2009-03-10 Thread socrtwo
On Mar 8, 2:04 am, socr...@gmail.com (Socrtwo) wrote: 1.http://docx2txt.sourceforge.net/- can this be installed in a Windows Strawberry Perl? 2. Why is there no Makefile.PL file? 3. Is 2. because it's a script not a module? 4. Do scripts need to be installed just like modules?  How do you

Re: connecting to multiple hosts using Net::SSH2

2009-03-10 Thread Dr.Ruud
Ron Bergin wrote: Jerald: #!/usr/bin/perl -w It's better to use the warnings pragma, instead of the -w switch And -w can also be better. For example when you want to enforce warnings to be active also for the used modules. (some module authors don't put a use warnings; in their modules)

Re: connecting to multiple hosts using Net::SSH2

2009-03-10 Thread Ron Bergin
On Mar 9, 3:37 am, que...@gmail.com (Jerald Sheets) wrote: On Mar 8, 2009, at 1:29 PM, Ron Bergin wrote: #!/usr/bin/perl -w It's better to use the warnings pragma, instead of the -w switch Another note on this... I just perldoc'ed it to see what it had to say: DESCRIPTION

Re: connecting to multiple hosts using Net::SSH2

2009-03-10 Thread Dr.Ruud
Gunnar Hjalmarsson wrote: Dr.Ruud: Gunnar Hjalmarsson: Dr.Ruud: Gunnar Hjalmarsson: eval { $ssh2-connect($_) }; if ($@) { warn Unable to connect host $_: $@ and next; } That is the old fashioned way. You really need to use the return value of eval to make sure. I

Re: connecting to multiple hosts using Net::SSH2

2009-03-10 Thread Dermot
2009/3/9 r...@i.frys.com: Jerald Sheets wrote: On Mar 8, 2009, at 1:29 PM, Ron Bergin wrote: On Mar 4, 4:46 am, que...@gmail.com (Jerald Sheets) wrote: I really think you're doing yourself a disservice by just throwing your program commands on lines, not indenting according to best

Parsing file line by line.

2009-03-10 Thread Meghanand Acharekar
Hi, Need some help How can I parse a file line by line using perl. I want to parse a test file having following data format *File : user_stats.txt* 20GB Larry 14.5MB Bob 3MBJohn so that I can send this data to a MySQL database table. Can I use while loop (any other loop control)

Re: Parsing file line by line.

2009-03-10 Thread Telemachus
On Tue Mar 10 2009 @ 4:13, Meghanand Acharekar wrote: Hi, Need some help How can I parse a file line by line using perl. I want to parse a test file having following data format *File : user_stats.txt* 20GB Larry 14.5MB Bob 3MBJohn so that I can send this data to a

unable to connect to all the hosts using Net::SSH2 module

2009-03-10 Thread monnappa appaiah
Hi all, Below is the script to login to multiple hosts and then execute the command and give the ouput in text file This script will login to all the hosts in input.txt(this file contains around 137 hosts) but when i run the scriptits giving me output for only 5 hosts whereas input file

perl2exe and DBI, DBD::Oracle modules

2009-03-10 Thread Sarsamkar, Paryushan
Hi All, I have one perl script which connects to oracle db and run some queries and get the job done. The initial code is as followed - --code--- #!/usr/bin/perl use strict; use warnings; use DBI; use DBD::Oracle; --code--- Then I have used perl2exe to generate a file so as to

FW: New Build for AIX Fails in debugger

2009-03-10 Thread Chuck Lyon
Hello, I'm hoping someone can help me identify the problem I'm encountering with a new PERL built with gcc on an AIX box. (I'd also appreciate any help in redirecting the request, if appropriate - TIA) The symptoms are that the debugger doesn't seem to be able to find the source code of the main

if (match) problem

2009-03-10 Thread Dermot
Hi, I am not getting the results that I expect from this test and I am not sure why. If I run the script below I get: 1..3 Line=???/FOO BAR, Name=Joe Smo M=??? ok 1 - handle_name ???/FOO BAR Line=change accordingly /FOO BAR, Name=Foo bar M=change ok 2 - handle_name change accordingly /FOO BAR

Re: connecting to multiple hosts using Net::SSH2

2009-03-10 Thread monnappa appaiah
Hi All, I'm facing another problem: Below is the script to login to multiple hosts and then execute the command and give the ouput in text file This script will login to all the hosts in input.txt(this file contains around 137 hosts) but when i run the scriptits giving me

Re: if (match) problem

2009-03-10 Thread Jim Gibson
On 3/10/09 Tue Mar 10, 2009 7:59 AM, Dermot paik...@googlemail.com scribbled: Hi, I am not getting the results that I expect from this test and I am not sure why. If I run the script below I get: 1..3 Line=???/FOO BAR, Name=Joe Smo M=??? ok 1 - handle_name ???/FOO BAR Line=change

Re: if (match) problem

2009-03-10 Thread Dermot
2009/3/10 Jim Gibson jimsgib...@gmail.com: On 3/10/09 Tue  Mar 10, 2009  7:59 AM, Dermot paik...@googlemail.com scribbled: Hi, I am not getting the results that I expect from this test and I am not sure why. If I run the script below I get: 1..3 Line=???/FOO BAR, Name=Joe Smo M=??? ok 1

Regex problem

2009-03-10 Thread howa
Hello, Consider the code: #=== use strict; my $a = 'a.jpg'; if ($a =~ /(html|jpg)/gi) { print 'ok'; } #=== Is the brucket () must be needed? Since I am not using back reference, are there a better way? Thanks. -- To unsubscribe, e-mail:

Re: Regex problem

2009-03-10 Thread Jim Gibson
On 3/10/09 Tue Mar 10, 2009 8:19 AM, howa howac...@gmail.com scribbled: Hello, Consider the code: #=== use strict; my $a = 'a.jpg'; if ($a =~ /(html|jpg)/gi) { print 'ok'; } #=== Is the brucket () must be needed? Since I am not using

Re: Regex problem

2009-03-10 Thread Chas. Owens
On Tue, Mar 10, 2009 at 11:19, howa howac...@gmail.com wrote: Hello, Consider the code: #=== use strict; my $a = 'a.jpg'; if ($a =~ /(html|jpg)/gi) {    print 'ok'; } #=== Is the brucket () must be needed? Since I am not using back reference, are

Re: Regex problem

2009-03-10 Thread Gunnar Hjalmarsson
howa wrote: Hello, Consider the code: #=== use strict; my $a = 'a.jpg'; if ($a =~ /(html|jpg)/gi) { print 'ok'; } #=== Is the brucket () must be needed? Parentheses. What happened when you tried without them? And why the /g modifier? Since I am

how to create your own module

2009-03-10 Thread itshardtogetone
Hi, I am using windowsXP and I have my perl installed in c:\perl I wish to write my own module and so I wrote a simple module and saved it in c:\perl\site\lib\mymod.pm but when I ran myscript below, nothing was printed out and the error msg was Global symbol @a requires explicit package name at

RE: how to create your own module

2009-03-10 Thread David Christensen
itshardtogetone: have my perl installed in c:\perl I wish to write my own module ... It's easiest to learn Perl on Unix/ Linux/ BSD/ etc. (I prefer Debian and FreeBSD.) If you don't have an extra computer to play with, install virtual machine software on your Windows machine and download a

RE: how to create your own module

2009-03-10 Thread Jenda Krynicky
From: David Christensen dpchr...@holgerdanske.com itshardtogetone: have my perl installed in c:\perl I wish to write my own module ... It's easiest to learn Perl on Unix/ Linux/ BSD/ etc. (I prefer Debian and FreeBSD.) No. It's easiest to learn Perl on whatever OS you are familiar