Re: Simple Script That Runs Under Perl 5.8 but not under Perl 5.10

2010-11-23 Thread John W. Krahn
Greg Grant wrote: The following script runs on 5.8 but does not run on 5.10. I distilled out a short program with the heart of the bug. The output of this script could be achieved easily without recursion but my real sort routine does need to be recursive, but I removed most of the code. Ignore

Re: Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread shawn wilson
I like net::ping. But what's the point of reinventing the wheel? There's dozens of network monitoring suites that'll do this for you - nagios for one should suite the purpose well enough. Also, nmap should have a module to allow you to audit ssh. With any luck, you might be able to access that fro

Re: Check if file is open in unix

2010-11-23 Thread Shlomi Fish
Hi Gopal, On Tuesday 23 November 2010 14:01:20 Gopal Karunakar wrote: > Hi All, > > I want to check whether a particular file (a simple text file) is open > in the UNIX environment. i.e. I want to make sure that its not getting > written into by some other process before my Perl process open

Re: perl web apps

2010-11-23 Thread Shlomi Fish
On Monday 22 November 2010 18:41:50 shawn wilson wrote: > On Mon, Nov 22, 2010 at 10:59 AM, Robert Wohlfarth wrote: > > On Mon, Nov 22, 2010 at 9:02 AM, shawn wilson wrote: > > > any of y'all write web apps in perl? what do you use? i'm using > > > html::template but i was thinking of going back

Re: Installation of Net::MySQL

2010-11-23 Thread Shlomi Fish
Hi BlackSwan, On Monday 22 November 2010 03:10:50 blackswa...@yahoo.com wrote: > My installation of RedHat Linux server 5.3 came with PERL 5.8. I > updated my version of PERL to 5.12, and my copy of PERL resides at / > root/localperl/bin/perl > > I've attempted to install DBD, DBI and Net::MySQL

Re: Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread Peter Scott
On Tue, 23 Nov 2010 21:59:19 +0530, Amit Saxena wrote: > Hi all, > > What's the best way to monitor ssh connectivity, and not just ssh port > availability, to a server using perl assuming following constraints ? > > I tried for Net::SSH but public private key is not allowed. > > I tried for Net

Re: [PBML] Re: Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread Amit Saxena
On Wed, Nov 24, 2010 at 1:19 AM, Joe Pepersack wrote: > > > Why not just call the ssh client and run a command on the remote host? > I'd set up a passwordless key to a restricted account for security, but > I'm paranoid. > > open LOG, '>>', '/path/to/logfile' or die "Can't open log file\n"; > > f

Simple Script That Runs Under Perl 5.8 but not under Perl 5.10

2010-11-23 Thread Greg Grant
The following script runs on 5.8 but does not run on 5.10. I distilled out a short program with the heart of the bug. The output of this script could be achieved easily without recursion but my real sort routine does need to be recursive, but I removed most of the code. Ignore the fact that this d

Re: Hashes from files. Unable to access values. Please, please help.

2010-11-23 Thread addie
> Where did $var come from? Sorry about that. That was a left over from the actual code that I tried to pare down to be a small example. Messed that up as badly as the copy/paste of the code made it really very ugly. Addie -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread C.DeRykus
On Nov 23, 8:29 am, learn.tech...@gmail.com (Amit Saxena) wrote: > Hi all, > > What's the best way to monitor ssh connectivity, and not just ssh port > availability, to a server using perl assuming following constraints ? > > I tried for Net::SSH but public private key is not allowed. > > I tried f

Re: Check if file is open in unix

2010-11-23 Thread Arun G Nair
On Tue, Nov 23, 2010 at 5:31 PM, Gopal Karunakar wrote: > Hi All, > >    I want to check whether a particular file (a simple text file) is open > in the UNIX environment. i.e. I want to make sure that its not getting > written into by some other process before my Perl process open it. So that > it

Re: Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread Arun G Nair
On Tue, Nov 23, 2010 at 10:13 PM, Amit Saxena wrote: > > On Tue, Nov 23, 2010 at 10:09 PM, shawn wilson wrote: > > > Well, each new ssh connection should spawn a new process so you could look > > at it from that end. More technically, you could look into netstat or lsof > > modules. > > On Nov 23

Re: Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread Amit Saxena
On Tue, Nov 23, 2010 at 10:09 PM, shawn wilson wrote: > Well, each new ssh connection should spawn a new process so you could look > at it from that end. More technically, you could look into netstat or lsof > modules. > On Nov 23, 2010 11:31 AM, "Amit Saxena" wrote: > > Hi all, > > > > What's t

Re: Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread shawn wilson
Well, each new ssh connection should spawn a new process so you could look at it from that end. More technically, you could look into netstat or lsof modules. On Nov 23, 2010 11:31 AM, "Amit Saxena" wrote: > Hi all, > > What's the best way to monitor ssh connectivity, and not just ssh port > avail

Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread Amit Saxena
Hi all, What's the best way to monitor ssh connectivity, and not just ssh port availability, to a server using perl assuming following constraints ? I tried for Net::SSH but public private key is not allowed. I tried for Net::SSH::Perl etc but these are not built in perl distribution (active per

Re: Check if file is open in unix

2010-11-23 Thread Chandrashekar Bhat
This might be useful... __CODE__ use Fcntl qw/O_WRONLY O_CREAT O_EXCL/; open(FH, "<", $file) or sysopen(FH, $file, O_WRONLY | O_CREAT | O_EXCL) or die "can't create new file $file: $!"; __CODE__ Thanks, Chandrashekar On Tue, Nov 23, 2010 at 5:31 PM, Gopal Karunakar wrote: > Hi All, >

Check if file is open in unix

2010-11-23 Thread Gopal Karunakar
Hi All, I want to check whether a particular file (a simple text file) is open in the UNIX environment. i.e. I want to make sure that its not getting written into by some other process before my Perl process open it. So that it will always get a complete file. Is there some way of making sure