Re: Need help with a question.
- From: Trev <trevor.dodds@xxxxxxxxx>
- Date: Sat, 28 Jun 2008 10:12:11 -0700 (PDT)
On Jun 28, 1:01 pm, "Erwin van Koppen" <inva...@xxxxxxxxxxxxxxx>
wrote:
"Trev" wrote:
Thanks, I've made the changes and so far so good.
foreach $cpqlog (@cpqlog_data) {
{
chomp($cpqlog);
if ($cpqlog =~ /MAC/) {
$cpqlog =~ s/ <FIELD NAME="Subject" VALUE="//i;
$cpqlog =~ s/ <FIELD NAME="MAC" VALUE="//i;
$cpqlog =~ s/"\/>//i;
}
}
}
You do understand that the above code does not actually change anything in
the file, right? The substitutions in $cpqlog are just discarded at the end
of the loop.
Oh, and you might want to get rid of the superfluous { }'s...
Yeah, I figured that out, I added a print BOO so the results are
writen to a file which I load in the next sub. This might not be the
best code but I'm still learning.
.
- References:
- Need help with a question.
- From: Trev
- Re: Need help with a question.
- From: Erwin van Koppen
- Re: Need help with a question.
- From: Trev
- Re: Need help with a question.
- From: Erwin van Koppen
- Need help with a question.
- Prev by Date: Re: Need help with a question.
- Next by Date: Re: Need help with a question.
- Previous by thread: Re: Need help with a question.
- Next by thread: Re: Need help with a question.
- Index(es):
Relevant Pages
|