Re: how to compare local time

2010-07-01 Thread Pad
On Jun 30, 1:12 pm, u...@stemsystems.com ("Uri Guttman") wrote: > > "SF" == Shlomi Fish writes: > >   >> my @vv = split('-',$variable); >   >> my @vale = split('##',$variable); > >   SF> Why are you splitting on strings instead of on regexes? << split(/##/, >   SF> $variable); >> > > that IS s

Re: how to compare local time

2010-06-30 Thread Uri Guttman
> "SF" == Shlomi Fish writes: >> my @vv = split('-',$variable); >> my @vale = split('##',$variable); SF> Why are you splitting on strings instead of on regexes? << split(/##/, SF> $variable); >> that IS splitting on regexes. split's first arg is always used as a regex. yes, it is b

Re: how to compare local time

2010-06-30 Thread John W. Krahn
Shlomi Fish wrote: On Wednesday 30 Jun 2010 13:52:19 Chaitanya Yanamadala wrote: try this.. now to get the $variable, read each line of the file by just opening it.. in this one only thing u need to do is value of $j Let me comment on your code. 1. Please show us all your code, not just

Re: how to compare local time

2010-06-30 Thread Chaitanya Yanamadala
hai Shlomi Thank you for your long reply... 1. Please show us all your code, not just part of it. A. This is the complete code i am using.. 2. Add "use strict;" and "use warnings;" to the beginning and fix all the problems it reports.. A. I have added warnings but not strict.. 3. Why are you

Re: how to compare local time

2010-06-30 Thread Shlomi Fish
On Wednesday 30 Jun 2010 13:52:19 Chaitanya Yanamadala wrote: > try this.. > > now to get the $variable, > read each line of the file by just opening it.. > in this one only thing u need to do is value of $j > Let me comment on your code. 1. Please show us all your code, not just part of it

Re: how to compare local time

2010-06-30 Thread Chaitanya Yanamadala
try this.. now to get the $variable, read each line of the file by just opening it.. in this one only thing u need to do is value of $j $variable = "name1##Thu Oct 18 14:33:23 2007##2007-10-18 14:33:23.0-0400"; my @vv = split('-',$variable); my @vale = split('##',$variable); print

Re: how to compare local time

2010-06-30 Thread Shlomi Fish
On Wednesday 30 Jun 2010 05:29:17 Pad wrote: > I'm trying to use the logic in my script that allows me to catch a > line that differs in time by comparing field2 and field3. I managed > to come up with an input file of this format for my comparison > purpose: > > name1##Thu Oct 18 14:33:23 2007

how to compare local time

2010-06-30 Thread Pad
I'm trying to use the logic in my script that allows me to catch a line that differs in time by comparing field2 and field3. I managed to come up with an input file of this format for my comparison purpose: name1##Thu Oct 18 14:33:23 2007## 2007-10-18 14:33:23.0 -0400 name2##Thu Feb