Hi Jeevan,
may be this code would help you.
I tested the code and it works fine.
You can specify start and end months that you want to capture the logs from
log file.
Change the following peice of code to the one which you want..
$2 <= 8) && ($2 >= 7)
The format is
$2 <=&& $2 >=
On 8/1/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
>
>
> -Original Message-
> >From: Jay Savage <[EMAIL PROTECTED]>
> >Sent: Aug 2, 2007 5:29 AM
> >To: Perl List
> >Subject: Re: parsing a log file by date
> >
> >'2 == 2' i
-Original Message-
>From: "Mumia W." <[EMAIL PROTECTED]>
>Sent: Aug 2, 2007 2:11 AM
>To: Beginners List
>Subject: Re: parsing a log file by date
>
>perl -le 'print "true" if 1==1'
>
>perldoc perlop
>
I mean '1=1'
On 08/01/2007 10:24 PM, Jeff Pang wrote:
[...]
$ perl -e 'print "true" if 1=1'
Can't modify constant item in scalar assignment at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
[...]
perl -le 'print "true" if 1==1'
perldoc perlop
--
To unsubscribe, e-mail: [EMAIL PROT
-Original Message-
>From: Jay Savage <[EMAIL PROTECTED]>
>Sent: Aug 2, 2007 5:29 AM
>To: Perl List
>Subject: Re: parsing a log file by date
>
>'2 == 2' is a Perl test for numeric equality, which has nothing to do
>with string comparisons. '1
On 8/1/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote:
> Jay Savage wrote:
> > Strings compare character by character, from left to right, so
> >
> > 2 = 2
OP asked why this particular date format sorts correctly using string
comparison. I wasn't giving example code (you might have noticed the
Jay Savage wrote:
Strings compare character by character, from left to right, so
2 = 2
2 == 2, '2' eq '2'
0 = 0
7 = 7
- = -
'-' == '-' (argument is not numeric)(x2), '-' eq '-'
1 = 1
1 < 2
10 > 2, '10' lt '2'
--
Just my 0.0002 million dollars worth,
Shawn
"For the things we ha
On Aug 1, 5:02 am, [EMAIL PROTECTED] (Jeevs) wrote:
> Before reading the above comments I used the localtime function of
> Time::Local to convert the dates into epochs and then comparing
> numerically.
>
> But thanks as i was not knowing that the strings i.e 2007-12-01 and
> 2007-12-02 can be compa
On 8/1/07, jeevs <[EMAIL PROTECTED]> wrote:
> Before reading the above comments I used the localtime function of
> Time::Local to convert the dates into epochs and then comparing
> numerically.
>
> But thanks as i was not knowing that the strings i.e 2007-12-01 and
> 2007-12-02 can be compared usin
jeevs wrote:
Before reading the above comments I used the localtime function of
Time::Local to convert the dates into epochs and then comparing
numerically.
But thanks as i was not knowing that the strings i.e 2007-12-01 and
2007-12-02 can be compared using the string operators for dates. Can
an
Before reading the above comments I used the localtime function of
Time::Local to convert the dates into epochs and then comparing
numerically.
But thanks as i was not knowing that the strings i.e 2007-12-01 and
2007-12-02 can be compared using the string operators for dates. Can
anyone point me t
On Jul 31, 12:36 pm, [EMAIL PROTECTED] (Chas Owens) wrote:
> On 7/31/07, jeevs <[EMAIL PROTECTED]> wrote:
> > 2007-08-09,0,0,0,0,0,0
> > 2007-08-11,0,0,0,0,0,1
> > 2007-08-11,0,0,0,0,0,1
> > 2007-08-12,0,0,0,2,3,2
> Use timelocal* or mktime** to convert the dates to the integer number
> of seconds
On 7/31/07, jeevs <[EMAIL PROTECTED]> wrote:
> Hello forum.
>
> I am here with a logical problem rather. I have a log file which will
> be huge in and can run in MBs.
> log file structure is like
>
> 2007-08-09,0,0,0,0,0,0
> 2007-08-11,0,0,0,0,0,1
> 2007-08-11,0,0,0,0,0,1
> 2007-08-12,0,0,0,2,3,2
>
jeevs wrote:
Hello forum.
I am here with a logical problem rather. I have a log file which will
be huge in and can run in MBs.
log file structure is like
2007-08-09,0,0,0,0,0,0
2007-08-11,0,0,0,0,0,1
2007-08-11,0,0,0,0,0,1
2007-08-12,0,0,0,2,3,2
What I am supposed to do is show the data betwee
14 matches
Mail list logo