Re: connecting to multiple hosts using Net::SSH2

2009-03-09 Thread Ron Bergin
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

Re: connecting to multiple hosts using Net::SSH2

2009-03-09 Thread Dr.Ruud
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

Re: connecting to multiple hosts using Net::SSH2

2009-03-09 Thread Jerald Sheets
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

Re: connecting to multiple hosts using Net::SSH2

2009-03-09 Thread Gunnar Hjalmarsson
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

Re: connecting to multiple hosts using Net::SSH2

2009-03-09 Thread Jerald Sheets
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

Re: connecting to multiple hosts using Net::SSH2

2009-03-09 Thread Jerald Sheets
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

Warnings

2009-03-09 Thread Gunnar Hjalmarsson
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: #!/usr/bin/perl -w It's better to use the warnings pragma, instead of the -w switch ... on the -w switch, here are Damian's words: 18.8. Warnings Always turn

Re: best variable structure that is easy to extract values?

2009-03-09 Thread Gunnar Hjalmarsson
Noah wrote: I am trying to figure out the best variable structure to contain the following data. and then also routines to extract it. Note there are 3-6 elements for the link_int associated with each network device. the Network devices are partitioned between the braces. { hostn

Re: connecting to multiple hosts using Net::SSH2

2009-03-09 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 ma

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

2009-03-09 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-09 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 modul