On 09/03/2009, Jerald Sheets wrote:
> to what was offered. When I get past leisurely using perl (I've been
> "in the family" for about 8 months now) and get a chance to use it in
> production more, I'm sure I'll be a little more familiar with the
> various indentation styles and issues surroundi
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 outpu
2009/3/9 :
> 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
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.
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:
>
> DESCRIPTIO
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 modul
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 ma
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
The "warnings" pragma is a replacement for the command line
f
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 unreadable, and can make i
Dr.Ruud wrote:
Gunnar Hjalmarsson wrote:
Dr.Ruud wrote:
Gunnar Hjalmarsson wrote:
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
Thanks, Dr. R! Good to see you on the newbie list!
I'm only about 6 months into this thing myself, but appreciate all
you've done.
--jms
On Mar 9, 2009, at 5:10 AM, Dr.Ruud wrote:
Gunnar Hjalmarsson wrote:
Dr.Ruud wrote:
Gunnar Hjalmarsson wrote:
eval { $ssh2->connect($_) };
i
Gunnar Hjalmarsson wrote:
Dr.Ruud wrote:
Gunnar Hjalmarsson wrote:
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 don't see anythi
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 unreadable, and can make it very hard
> to debug the more involv
Dr.Ruud wrote:
Gunnar Hjalmarsson wrote:
monnappa appaiah wrote:
This the error i'm getting
Net::SSH2::connect: failed to connect to 10.10.10.1:22: Unknown error at
connect.pl line 21
the line 21 is shown below
$ssh2->connect($_) or warn "Unable to connect host $_\n" and next;
It's appa
Gunnar Hjalmarsson wrote:
monnappa appaiah wrote:
This the error i'm getting
Net::SSH2::connect: failed to connect to 10.10.10.1:22: Unknown error at
connect.pl line 21
the line 21 is shown below
$ssh2->connect($_) or warn "Unable to connect host $_\n" and next;
It's apparent that the fa
Hi Gunnar,
It worked, thanks a lot for helping out...thanks to
all for helping
Thanks,
Monnappa
On 3/5/09, Gunnar Hjalmarsson wrote:
> monnappa appaiah wrote:
>> This the error i'm getting
>>
>> Net::SSH2::connect: failed to connect to 10.10.10.1:22: Unknown error at
>> co
monnappa appaiah wrote:
This the error i'm getting
Net::SSH2::connect: failed to connect to 10.10.10.1:22: Unknown error at
connect.pl line 21
the line 21 is shown below
$ssh2->connect($_) or warn "Unable to connect host $_\n" and next;
It's apparent that the fatal error happens inside Net:
Hi Dermot,
This the error i'm getting
Net::SSH2::connect: failed to connect to 10.10.10.1:22: Unknown error at
connect.pl line 21
the line 21 is shown below
$ssh2->connect($_) or warn "Unable to connect host $_\n" and next;
Thanks,
Monnappa
On Wed, Mar 4, 2009 at 5:44 PM, D
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi there.
My biggest comment isn't the answer to your question, but I will
attempt to address that too.
I really think you're doing yourself a disservice by just throwing
your program commands on lines, not indenting according to best
practic
2009/3/4 monnappa appaiah :
> Hi,
>
> I tried that warn(and next) still its not logging into the next
> host...Kindly help me with this
It's a bit hard to help without seeing the errors.
Do you see the warn message? Are you sure that it fails because the
host is unreachable or coul
Hi,
I tried that warn(and next) still its not logging into the next
host...Kindly help me with this
Thanks,
Monnappa
On Wed, Mar 4, 2009 at 4:53 PM, Dermot wrote:
> 2009/3/4 monnappa appaiah :
> > Hi all,
> Hi
>
> > Hi i'm able to connect to mulitple hosts now and it will log
2009/3/4 monnappa appaiah :
> Hi all,
Hi
> Hi i'm able to connect to mulitple hosts now and it will login to all the
> hosts specified in the input file (input.txt)
>
> if there is a host which doesn't exist in input file (input.txt), the
> program ends without going to the next host in the file
Hi all,
Hi i'm able to connect to mulitple hosts now and it will login to all the
hosts specified in the input file (input.txt)
if there is a host which doesn't exist in input file (input.txt), the
program ends without going to the next host in the file
for example: if the input.txt has three
monnappa appaiah wrote:
> Hi all,
>
>
> I'm using windows machine and i'm using Net::SSH2 module to connect
> to remote machine
>
> below is the code i'm using, its working fine if i'm connecting to one host
>
> #!/usr/bin/perl -w
> use strict;
> use Net::SSH2;
>
>
> my $ssh2 = Net::S
On 2/26/09 Thu Feb 26, 2009 8:26 AM, "monnappa appaiah"
scribbled:
> Hi all,
>
>
> I'm using windows machine and i'm using Net::SSH2 module to connect
> to remote machine
> How can i use the same piece of code to read a list of hosts from a text
> file and then connect to all the hos
25 matches
Mail list logo