RE: How to replace a literal with a variable

2002-07-30 Thread nkuipers
I'm probably not understanding what exactly you needbut...as I see it, $err holds whatever error message that you captured with a regex. So if you want to make a variable with the same name as the literal, dereference a variable with the name held in $err and the new var will autovivify:

RE: How to replace a literal with a variable

2002-07-30 Thread Timothy Johnson
If you just want to repolace "nlf" with a variable, you can just replace it with a variable? if ($err eq $variable){ Or else you need to be more specific about what you need. -Original Message- From: Larry Steinberg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 8:06 AM To: [E

RE: How to replace a literal with a variable

2002-07-30 Thread Jeff 'japhy' Pinyan
On Jul 30, nkuipers said: >I'm probably not understanding what exactly you needbut...as I see it, >$err holds whatever error message that you captured with a regex. So if you >want to make a variable with the same name as the literal, dereference a >variable with the name held in $err and th

Re: How to replace a literal with a variable

2002-07-30 Thread Jeff 'japhy' Pinyan
On Jul 30, Larry Steinberg said: >How can I replace the literal "nlf" with a variable in the code below? This was asked and answered in CLPM, but I'll answer anyway. >sub parseLogLine { >$line = $_; > >%searchInfo = (); >@searchInfo = split / +/, $line; > ># found any listings?

Re: How to replace a literal with a variable

2002-07-30 Thread Larry Steinberg
Here is what I need. I hope this explains it better. I have a script which creates a report for No Listings Found errors. I'd like to adapt it to create a report for any "ERR " code condition in the log. The errors and values are below. TIA! >>>Error | Value<<< city not in state | TSE ZIP not

RE: How to replace a literal with a variable

2002-07-30 Thread Timothy Johnson
[mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 10:17 AM To: [EMAIL PROTECTED] Subject: Re: How to replace a literal with a variable Here is what I need. I hope this explains it better. I have a script which creates a report for No Listings Found errors. I'd like to adapt it to create

Re: How to replace a literal with a variable

2002-07-31 Thread Larry Steinberg
age- > From: Larry Steinberg [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 30, 2002 10:17 AM > To: [EMAIL PROTECTED] > Subject: Re: How to replace a literal with a variable > > > Here is what I need. I hope this explains it better. > > I have a script which