Re: query in searching

2009-03-24 Thread Chas. Owens
On Tue, Mar 24, 2009 at 19:50, Rajini Naidu wrote: snip >> open my $IN,  '<', "$data_dir/$node.load" or die "Cannot open >> '$data_dir/$node.load' $!"; >> open my $OUT, '>', "/tmp/$day[0].$day[1].$day[2].$node.log" or die "Cannot >> open '/tmp/$day[0].$day[1].$day[2].$node.log' $!"; >> >> while (

Re: First attempt at writing simple Module

2009-03-24 Thread Chas. Owens
On Wed, Mar 25, 2009 at 00:03, Chap Harrison wrote: > Hi again, > > I'm trying to factor out the declaration and setting of a bunch of variables > that a suite of programs will need, as well as defining some subroutines > that will be needed.  I've been mainly referencing Programming Perl 5, but I

First attempt at writing simple Module

2009-03-24 Thread Chap Harrison
Hi again, I'm trying to factor out the declaration and setting of a bunch of variables that a suite of programs will need, as well as defining some subroutines that will be needed. I've been mainly referencing Programming Perl 5, but I am mighty confused at this point. I'm particularly c

Re: query in searching

2009-03-24 Thread Rajini Naidu
Thanks John for the reply. I included the code as you suggested, but does'nt seem to work. The output file is empty. -rajini On Wed, Mar 25, 2009 at 12:19 AM, John W. Krahn wrote: > Rajini Naidu wrote: > >> Hi, >> > > Hello, > > > I am trying to search for a pattern in a file in my pe

query in searching

2009-03-24 Thread Rajini Naidu
Hi, I am trying to search for a pattern in a file in my perl script. Syntax used is : system("grep \"$res\" ${data_dir}/${node}.load > /tmp/${day[0]}.${day[1]}.${day[2]}.${node}.log"); But the grep command is'nt successful in getting the desired string. Am I missing anything here ? Rajini

Re: query in searching

2009-03-24 Thread John W. Krahn
Rajini Naidu wrote: Hi, Hello, I am trying to search for a pattern in a file in my perl script. Syntax used is : system("grep \"$res\" ${data_dir}/${node}.load > /tmp/${day[0]}.${day[1]}.${day[2]}.${node}.log"); But the grep command is'nt successful in getting the desired string. Am I miss

Re: How to implement "tail -f" using perl in both windows and linux !

2009-03-24 Thread Chas. Owens
On Tue, Mar 24, 2009 at 10:26, Bob McConnell wrote: snip > As a result, installing a new module on the production server is very > expensive. It must go through our code review and QA testing as well as > being repackaged in the correct format for deployment. It is difficult > to justify this expe

RE: How to implement "tail -f" using perl in both windows and linux !

2009-03-24 Thread Bob McConnell
From: Chas. Owens > On Mon, Mar 23, 2009 at 14:16, Amit Saxena wrote: >> Is it possible to implement this without using any external modules from >> CPAN ? > > The FAQ covers this quite nicely (see below). In general you should > use File::Tail[1]. And on UNIX systems, of course, you can always