Re: Perl Parsing

2007-02-23 Thread Rob Dixon
Sumit Shah wrote: > > Rob Dixon wrote: >> >>> Sumit Shah wrote: >>> >>> I have a string like: 'a = 1; b = 2; c = 3; d = 4' >>> >>> Whats the best way to parse it so that I can get a value for c, which is >>> 3? I have used the hash approach. But, I was wondering if there is a >>> faster way to do

RE: Perl Parsing

2007-02-23 Thread Sumit Shah
Thanks Ralph. It worked. Sumit -Original Message- From: Ralph Moritz [mailto:[EMAIL PROTECTED] Sent: Wed 2/21/2007 12:54 PM To: beginners@perl.org Cc: Subject: Re: Perl Parsing [EMAIL PROTECTED] (Sumit Shah

RE: Perl Parsing

2007-02-23 Thread Sumit Shah
hing much quicker than this. I need to use it inside Apache and need it to be as lightweight as possible. Thanks Sumit -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Fri 2/23/2007 1:51 PM To: beginners@perl.org Cc:

Re: Perl Parsing

2007-02-23 Thread Rob Dixon
Sumit Shah wrote: I have a string like: 'a = 1; b = 2; c = 3; d = 4' Whats the best way to parse it so that I can get a value for c, which is 3? I have used the hash approach. But, I was wondering if there is a faster way to do it in Perl. What do you mean by 'the hash approach'? Can you po

Re: Perl Parsing

2007-02-23 Thread Jefferson Kirkland
On 2/21/07, Sumit Shah <[EMAIL PROTECTED]> wrote: Hello All, I have a string like: 'a = 1; b = 2; c = 3; d = 4' Whats the best way to parse it so that I can get a value for c, which is 3? I have used the hash approach. But, I was wondering if there is a faster way to do it in Perl. Well, fr

Re: Perl Parsing

2007-02-22 Thread Ralph Moritz
[EMAIL PROTECTED] (Sumit Shah) writes: > I have a string like: 'a = 1; b = 2; c = 3; d = 4' > > Whats the best way to parse it so that I can get a value for c, which > is 3? I have used the hash approach. But, I was wondering if there is > a faster way to do it in Perl. I don't know about `best',

Re: Perl Parsing

2007-02-21 Thread JupiterHost.Net
Sumit Shah wrote: Hello All, Heloo, I have a string like: 'a = 1; b = 2; c = 3; d = 4' Whats the best way to parse it so that I can get a value for c, which is 3? I have used the hash approach. But, I was wondering if there is a faster way to do it in Perl. Why do you say hashes are sl

Re: Perl Parsing

2007-02-21 Thread David Moreno Garza
Sumit Shah wrote: > I have a string like: 'a = 1; b = 2; c = 3; d = 4' my($c) = $string =~ /c = (\d)/; Maybe? -- David Moreno Garza <[EMAIL PROTECTED]> | http://www.damog.net/ Una vida sencilla para nada es aburrida. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

Perl Parsing

2007-02-21 Thread Sumit Shah
Hello All, I have a string like: 'a = 1; b = 2; c = 3; d = 4' Whats the best way to parse it so that I can get a value for c, which is 3? I have used the hash approach. But, I was wondering if there is a faster way to do it in Perl. Thanks Sumit -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Perl parsing script

2004-04-23 Thread Claude
>>>>> "Ron" == Ron McKeever <[EMAIL PROTECTED]> writes: Ron> I am trying to figure out my Perl parsing script to dump the Ron> interesting part of my log files to another parsed file. [...] Ron> But I get errors... I am affraid You have to solve this iss

Re: Help -Perl parsing script

2004-04-19 Thread Rob Dixon
Wc -Sx- Jones wrote: > > Ron McKeever wrote: > > Thank you for replying. > > > > Actually there are 7 columns the last one got cut off in the email. > > The column im working on is the 6th. > > > > Thats why i thought i needed to split it? > > >>RIp > >> - - -

Re: Help -Perl parsing script

2004-04-17 Thread WC -Sx- Jones
Ron McKeever wrote: Thank you for replying. Actually there are 7 columns the last one got cut off in the email. The column im working on is the 6th. Thats why i thought i needed to split it? RIp - - ---- - 1074715516 11

Re: Help -Perl parsing script

2004-04-17 Thread WC -Sx- Jones
Ron McKeever wrote: RIp - - ---- - 1074715516 111 222.222.2.2 2566 111.111.111.180 111.111.111.1 1074715516 222 .3584 .80 . 1074715516 400 .

Help -Perl parsing script

2004-04-17 Thread Ron McKeever
Can someone point me in the right direction?? I am trying to figure out my Perl parsing script to dump the interesting part of my log files to another parsed file. Bascially I want to try an remove "Dport" rows that contain 80,53,25, etc... Those are tabs between each field. Log

Perl parsing script

2004-04-16 Thread Ron McKeever
I am trying to figure out my Perl parsing script to dump the interesting part of my log files to another parsed file. Bascially I want to try an remove "Dport" rows that contain 80,53,25, etc...Those are tabs between each field. Log File name "log.040411": Start