Re: Using perl to parse specific lines by date...

2003-12-26 Thread u235sentinel
26/Dec FYI.. playing with it a bit. I discovered there must be a carriage return (new line) after the line processes. I changed my original code to do this chomp(my $date = `date +%d/%b`); This fixed the problem. hehehe... I should have thought of this. Oh well.. not bad after a few weeks

Re: Using perl to parse specific lines by date...

2003-12-26 Thread R. Joseph Newton
u235sentinel wrote: > While I've already done this with a simple shell script using grep, I > was trying to figure out how I can do the same thing in perl. > > I have an access_log from my apache web server and while I can manually > enter a date for my pattern match (which works fine), I can't s

Re: Using perl to parse specific lines by date...

2003-12-26 Thread u235sentinel
Thx to everyone on this. I chucked the system date function I originally wrote and used strftime and localtime. Guess I haven't read that part of the perl book yet ;-) So when I wrote the program originally, was it populating $date incorrectly? I'm hoping to understand why it didn't work in t

Re: Using perl to parse specific lines by date...

2003-12-26 Thread John W. Krahn
U235sentinel wrote: > > While I've already done this with a simple shell script using grep, I > was trying to figure out how I can do the same thing in perl. > > I have an access_log from my apache web server and while I can manually > enter a date for my pattern match (which works fine), I can'

Re: Using perl to parse specific lines by date...

2003-12-26 Thread Randy W. Sims
On 12/26/2003 6:35 PM, u235sentinel wrote: Are these date functions of perl part of the normal distribution or a CPAN module? if (m|\Q$date\U|) This didn't seem to make a difference. I noticed a couple of commands that may help. System and exec. Apparently they were further in the Learn

Re: Using perl to parse specific lines by date...

2003-12-26 Thread u235sentinel
Are these date functions of perl part of the normal distribution or a CPAN module? if (m|\Q$date\U|) This didn't seem to make a difference. I noticed a couple of commands that may help. System and exec. Apparently they were further in the Learning Perl book (I cheated.. flipped ahead ::

Re: Using perl to parse specific lines by date...

2003-12-26 Thread Randy W. Sims
On 12/26/2003 5:39 PM, u235sentinel wrote: While I've already done this with a simple shell script using grep, I was trying to figure out how I can do the same thing in perl. I have an access_log from my apache web server and while I can manually enter a date for my pattern match (which works f