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:
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
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
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?
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
[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
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