On Jun 30, 1:12 pm, [email protected] ("Uri Guttman") wrote: > >>>>> "SF" == Shlomi Fish <[email protected]> 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 better code to show it as a regex with //. note that > split even has a special case of ' ' which is not the same as / /. > > uri > > -- > Uri Guttman ------ [email protected] -------- http://www.sysarch.com-- > ----- Perl Code Review , Architecture, Development, Training, Support ------ > --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com---------
Fish, Uri, John, Chaithanya Thank you for all your suggestion. I'm planning to convert fileld 2 and field3 to epoch time, and compare the strings. I was told of Data::Parse module that has str2time() will do the trick of converting these time formats to epoch time. Thanks again for all your solution. -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
